Subject | Re: [firebird-support] How does the optimizer factor in views? |
---|---|
Author | Ann Harrison |
Post date | 2011-09-26T20:26:34Z |
On Mon, Sep 26, 2011 at 12:06 PM, firebirdsql <firebirdsql@...> wrote:
case is more complicated.
Good luck,
Ann
> I have the following view:In this case yes, but some views must be instantiated first, so the general
> CREATE VIEW as example
> AS
> SELECT col1 FROM table1 INNER JOIN table2 USING(col1);
>
> Then when I use it:
> SELECT a.col1, a.col2, a.col3 FROM table1 AS a INNER JOIN example
> USING (col1);
>
>
> Is the optimizer smart enough to figure out that it can join table1
> directly to table 2 and get col1, col2, col3? Or does it process the view
> first and then join it to table1 (redundant) and get col1, col2, col3?
>
case is more complicated.
> Is it possible to display a detailed execution plan?With isql, you can say set plan, or set plan only.
>
Good luck,
Ann
>[Non-text portions of this message have been removed]
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>