|Subject||Re: [firebird-support] Reading unnecessary records|
On 04/04/2014 23:36, Alexandre Benson Smith wrote:
All of which is true, but it is also true that the optimiser doesn't always work out that some of the stuff returned by the view is never used by a particular query that calls the view, and that therefore it doesn't need to be calculated. (To put it very very crudely.)
If you don't need a particular table information, having it on the view is useless... So if you have the need of a distinct rescult set only one view would not handle this. So the on the fly generated query is not better than the view because it's better optimzed than a view would be, but because it's a diferent query.
-- Tim Ward