Subject RE: [firebird-support] Re: Better plan for delete statement
Author Rick DeBay
Implicit JOINs are frowned upon.

delete from A where exists(select 1 from B join A on B.AID=A.AID where
B.TYP=3 and B.PARENTID=51)

-----Original Message-----
From: Christian Kaufmann [mailto:ch.kaufmann@...]
Sent: Tuesday, October 05, 2004 4:18 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Better plan for delete statement



Hi Daniel,

>Try this:
>delete from A
> where exist(select 1 from B
> where (TYP = 3) and (PARENTID = 51) and
(B.AID=A.AID))

no change here. The same plan is used:

PLAN (B INDEX (IX_B_TYP)) PLAN (A NATURAL)

>statement that you are trying, but it would most likely require some
>changes in Firebird's engine.
Well, that's to much for me, since as Delphi programmer I don't have a
good "relationship" with C++...

cu Christian







Yahoo! Groups Links