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 9B91AB4388C for ; Mon, 7 Jul 2003 16:10:06 +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 41438-08 for ; Mon, 7 Jul 2003 13:09:55 -0300 (ADT) Received: from mail.bgm-gmbh.de (gamma.bgm-hosting.de [217.115.144.90]) by svr1.postgresql.org (Postfix) with ESMTP id 720B1B43183 for ; Mon, 7 Jul 2003 13:09:55 -0300 (ADT) Received: from bgm-gmbh.de (localhost [127.0.0.1]) by mail.bgm-gmbh.de (Postfix) with ESMTP id E04D8B5C6C; Mon, 7 Jul 2003 18:09:54 +0200 (CEST) Received: from [141.40.169.188] (unknown [141.40.169.188]) by mail.bgm-gmbh.de (Postfix) with ESMTP id AF9D0B5C2C; Mon, 7 Jul 2003 18:09:53 +0200 (CEST) Subject: Re: max length of sql select statement ? From: markus brosch To: mallah@trade-india.com Cc: pgsql-sql In-Reply-To: <1101.219.65.226.199.1057593454.squirrel@mail.trade-india.com> References: <1057592658.881.93.camel@sam> <1101.219.65.226.199.1057593454.squirrel@mail.trade-india.com> Content-Type: text/plain Organization: Message-Id: <1057594050.886.104.camel@sam> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 07 Jul 2003 18:07:31 +0200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS perl-11 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/72 X-Sequence-Number: 14186 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? And what means efficient? Goes the DB only once through the table? Cheers, Markus