Received: from moutng0.schlund.de (moutng0.kundenserver.de [212.227.126.170]) by postgresql.org (Postfix) with ESMTP id 8E6BE4758A5 for ; Wed, 10 Apr 2002 06:23:51 -0400 (EDT) Received: from [172.19.20.62] (helo=mrvdomng1.kundenserver.de) by moutng0.schlund.de with esmtp (Exim 3.22 #2) id 16vFGa-0000pB-00 for pgsql-sql@postgresql.org; Wed, 10 Apr 2002 12:23:52 +0200 Received: from [213.7.180.148] (helo=BURNT.asa.de) by mrvdomng1.kundenserver.de with esmtp (Exim 3.22 #2) id 16vFGZ-0007WD-00 for pgsql-sql@postgresql.org; Wed, 10 Apr 2002 12:23:51 +0200 Message-Id: <5.1.0.14.2.20020410122013.01cfdec0@pop.kundenserver.de> X-Sender: m6261949-7@pop.kundenserver.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 10 Apr 2002 12:24:26 +0200 To: pgsql-sql@postgresql.org From: Bernd von den Brincken Subject: Optimizer for IN (..) ? / Re: Thank you ! Re: Is there any Faster workaround ?? In-Reply-To: <3CB35DF8.D26E2055@trade-india.com> References: <3CB346F6.1DD7CFB9@trade-india.com> <3CB356D8.48F8F5F4@nsd.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200204/178 X-Sequence-Number: 7442 Hello, At 09.04.2002 23:32, Rajesh Kumar Mallah wrote: >i think this question has been answered before also in >this mailing list sorry for asking... >... > > How about: > > > > DELETE from t_a where exist (select email from t_b where t_b.email = > > t_a.email) > > > > Rajesh Kumar Mallah wrote: > > > ... We require to do below or similar quite often > > > > > > DELETE from t_a where email in (select email from t_b); > > > > > > everyone knows "IN" is pain fully slow currently in pgsql > > > is the any fster alternative to above query Yes this question was posted before - and if so, and if the answer is so simple - would it not make sense to implement this wisdom in the optimizer? Regards // Bernd vdB