X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 46393B43848 for ; Mon, 7 Jul 2003 16:13:42 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 48537-08 for ; Mon, 7 Jul 2003 13:13:31 -0300 (ADT) Received: from trade-india.com (ns1.trade-india.com [66.234.10.14]) by svr1.postgresql.org (Postfix) with SMTP id 04058B43368 for ; Mon, 7 Jul 2003 13:13:31 -0300 (ADT) Received: (qmail 26857 invoked by uid 505); 7 Jul 2003 16:13:46 -0000 Received: from mallah@trade-india.com by ns1.trade-india.com by uid 502 with qmail-scanner-1.16 (clamscan: 0.54. spamassassin: 2.54. Clear:SA:0(-100.1/5.0):. Processed in 0.542145 secs); 07 Jul 2003 16:13:46 -0000 Received: from ns1.trade-india.com (HELO trade-india.com) (66.234.10.14) by ns1.trade-india.com with SMTP; 7 Jul 2003 16:13:45 -0000 Received: from 219.65.226.199 (SquirrelMail authenticated user mallah) by mail.trade-india.com with HTTP; Mon, 7 Jul 2003 21:43:45 +0530 (IST) Message-ID: <1134.219.65.226.199.1057594425.squirrel@mail.trade-india.com> Date: Mon, 7 Jul 2003 21:43:45 +0530 (IST) Subject: Re: max length of sql select statement ? From: To: In-Reply-To: <1057594050.886.104.camel@sam> References: <1057592658.881.93.camel@sam> <1101.219.65.226.199.1057593454.squirrel@mail.trade-india.com> <1057594050.886.104.camel@sam> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/73 X-Sequence-Number: 14187 > On Mon, 2003-07-07 at 17:57, mallah@trade-india.com wrote: >> Depending on ur original problem EXISTS or IN may be usable >> EXISTS is efficient and IN can be used efficiently in 7.4 version of >> postgresql > > Could be a solution?! > The question is - how long could the IN be? > > I mean, if I write something like: > SELECT * FROM table WHERE columnX IN ('a', 'b', 'c', 'd', 'e', ... ); > How long can the collection (list) within IN be? Also thousands of > elements? Well i DO NOT know the exact limit. May be someone else can answer it accurately. But you could produce the list within IN using a subselect that again depends on the exact problem. regds Mallah. > > And what means efficient? Goes the DB only once through the table? > > Cheers, Markus > > > > > ---------------------------(end of > broadcast)--------------------------- TIP 2: you can get off all lists > at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) ----------------------------------------- Get your free web based email at trade-india.com. "India's Leading B2B eMarketplace.!" http://www.trade-india.com/