Why wouldn't it be necessary, this is an inner join, so the joined table needs 
to be evaluated if the matches row is present.
Mark

----- Bericht beantwoorden -----
Van: "Gabor Boros gaborbo...@yahoo.com [firebird-support]" 
<firebird-support@yahoogroups.com>
Aan: <firebird-support@yahoogroups.com>
Onderwerp: [firebird-support] VIEW optimization
Datum: do, apr. 7, 2016 18:34

Hi All,

VIEW:
CREATE VIEW VIEW1 AS
SELECT RDB$RELATION_FIELDS.RDB$RELATION_NAME, RDB$FIELD_NAME FROM 
RDB$RELATION_FIELDS
JOIN RDB$RELATIONS ON
RDB$RELATION_FIELDS.RDB$RELATION_NAME=RDB$RELATIONS.RDB$RELATION_NAME;

SELECT:
SELECT RDB$FIELD_NAME FROM VIEW1

PLAN:
PLAN JOIN (VIEW1 RDB$RELATION_FIELDS NATURAL, VIEW1 RDB$RELATIONS INDEX 
(RDB$INDEX_0))


Plan contains the JOIN but that not needed for the selected field. Is 
this an SQL standard thing or just Firebird's optimizer not smart enough?

Gabor


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links



https://info.yahoo.com/legal/us/yahoo/utos/terms/
  • [firebird-support... Gabor Boros gaborbo...@yahoo.com [firebird-support]
    • Re: [firebir... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
    • Re: [firebir... 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
    • Re: [firebir... Gabor Boros gaborbo...@yahoo.com [firebird-support]
    • Re: [firebir... 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
    • Re: [firebir... 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
    • Re: [firebir... Gabor Boros gaborbo...@yahoo.com [firebird-support]
      • Re: [fir... Ann Harrison aharri...@ibphoenix.com [firebird-support]
        • Re: ... Ann Harrison aharri...@ibphoenix.com [firebird-support]
        • Re: ... Gabor Boros gaborbo...@yahoo.com [firebird-support]

Reply via email to