Hi,

I'm using FB 3.0.4 on Windows and i'm asking why the index (on field_B)is not used in the follwing query?

Select * from table_A a left join table_B b on a.field_A = b.field_A where b.field_B = 1;

field_A is a standard foreign key and field_B is an indexed field but the index is not used and so the query is slow (for big tabels).

When i use an inner join the index on field_B is used, but i don't get why FB has to make a difference in this case.

In this case the result set should always be the same, regardless of inner join or left join, or not?

Regards
Carsten
  • [firebi... Carsten Schäfer ca_schae...@gmx.de [firebird-support]
    • [f... Carsten Schäfer ca_schae...@gmx.de [firebird-support]
      • ... Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
        • ... Carsten Schäfer ca_schae...@gmx.de [firebird-support]
          • ... Svein Erling Tysvær setys...@gmail.com [firebird-support]
          • ... Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
      • ... Svein Erling Tysvær setys...@gmail.com [firebird-support]

Reply via email to