Subject Re: [Firebird-general] OpenCRX DBMS comparison
Author Martijn Tonies
> >> Personally, I wouldn't mind seeing views being precompiled, just short
> >> of going through the optimizer, because of the indices stats can
> >> change with the amount of data. And, when the view is being
> >> referenced, the optimizer would generate the plan at that time.
>
> > I'm not sure I understand you. The access paths for the view internals
are
> > chosen when a view is referenced in the query.
>
> I think I could me clearer. The views could be partially
> prepared/compiled(at creation time), excluding the optimizer
> processing. And, when the view is to be used, the optimizer would be
> called to evaluate the plan to be used.
>
> It's just my 2 cents.

We disagree there then :-)

The plan used to execute a query can be very different from the plan
used for only the view itself.

Given that a view can be used in conjunction with a very complex
additional query, I think that the plan should be recreated every time
the view would be accessed.

Of course, a "query plan cache" could be useful for all queries in Firebird
:-)

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com