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 6DCDFB438AC for ; Mon, 7 Jul 2003 16:26:30 +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 52469-10 for ; Mon, 7 Jul 2003 13:26:19 -0300 (ADT) Received: from mail.bgm-gmbh.de (gamma.bgm-hosting.de [217.115.144.90]) by svr1.postgresql.org (Postfix) with ESMTP id 70AD0B4388E for ; Mon, 7 Jul 2003 13:26:19 -0300 (ADT) Received: from bgm-gmbh.de (localhost [127.0.0.1]) by mail.bgm-gmbh.de (Postfix) with ESMTP id 65442B64AC; Mon, 7 Jul 2003 18:26:19 +0200 (CEST) Received: from [141.40.169.188] (unknown [141.40.169.188]) by mail.bgm-gmbh.de (Postfix) with ESMTP id 400ACB5D1E; Mon, 7 Jul 2003 18:26:18 +0200 (CEST) Subject: Re: max length of sql select statement ? From: markus brosch To: Stephan Szabo Cc: pgsql-sql In-Reply-To: <20030707091855.O77173-100000@megazone23.bigpanda.com> References: <20030707091855.O77173-100000@megazone23.bigpanda.com> Content-Type: text/plain Organization: Message-Id: <1057595035.881.119.camel@sam> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 07 Jul 2003 18:23:55 +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/77 X-Sequence-Number: 14191 > > but how are you searching through your table with sql, when your SELECT > > is against a collection of different elements (e.g. Array of Strings, > > which should fit on one column and return all records which fit) > > Are the 'a', 'b', etc... fixed or generated on the fly? I'm not sure > that the plan for a thousand OR clauses (or equivalently a thousand > entries in a static IN) is going to necessarily be terribly good. You > might have better luck setting it up to do a join with a table (possibly a > temporary table if they're generated on the fly). Generated "on the fly" by JDBC within Java ;-) I already tried the join, but it takes ages *g*