Subject Re: Odp: [firebird-support] Indexes on subquery
Author Ann Harrison
> On Nov 29, 2013, at 12:10 PM, Umberto Masotti <masotti@...> wrote:
>
>> select id from TEST T where exists(select * from subquerytable sq
>> where sq.id2 = t.id2)
>
> That query seems logically equivalent to
>
> SELECT id FROM TEST T JOIN SUBQUERYTABLE SQ ON (T.id2=SQ.id2)

The two queries are the same if there is at most one SQ.id2 for eacht T.id2.

Good luck,

Ann