Subject Re: [firebird-support] Optimisation Question
Author Carlos H. Cantu
Am I too tired or the second SQL you posted is invalid ?

Anyway, take care since in FB subqueries can be very slow. You must,
always as possible, write your SQL using JOINs.

Carlos
http://www.warmboot.com.br
FireBase - http://www.FireBase.com.br

d> With firebird, why is that this:

d> select TABLE_A.field1
d> from TABLE_A
d> where TABLE_A.joinfield not in (select distinct joinfield from TABLE_B)

d> runs much much much slower than

d> SELECT TABLE_A.field1
d> from TABLE_A
d> inner JOIN TABLE_A on TABLE_A.joinfield = TABLE_B.joinfield