Article View: borland.public.interbase.sql
Article #283Store Procedure and IN
From: Safwan
Date: Wed, 20 Feb 2008 23:58
Date: Wed, 20 Feb 2008 23:58
28 lines
1469 bytes
1469 bytes
Hi Select * From MyView Where foo1 = foo2 and foo3 = foo4 and foo5 = foo6 or ID in (Select ID From MyTable Where f1 = f2); With the above statement the speed is acceptable. But when changeing the same view (MyView) into a store procedure with - for select .... from ... do suspend. - like this : Select * From MyStoreProcedure Where foo1 = foo2 and foo3 = foo4 and foo5 = foo6 or ID in (Select ID From MyTable Where f1 = f2); The statement take a looooong time to fetch the records. I use the PLANalyzer to check the statement, I notice that the in clause cause slow. What should I do to speed up my query ?? Your's Safwan.
Technical Details
Message-ID:
<47bcbe87@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,5e0810130fee05d6,start X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Safwan" <safwan_maswadeh@yahoo.com> Newsgroups: borland.public.interbase.sql Subject: Store Procedure and IN Date: Thu, 21 Feb 2008 01:58:12 +0200 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 213.6.65.243 Message-ID: <47bcbe87@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1203551879 213.6.65.243 (20 Feb 2008 15:57:59 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail