X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id E4A96925984 for ; Fri, 23 May 2003 08:28:33 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 48143-02 for ; Fri, 23 May 2003 08:28:01 -0400 (EDT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by developer.postgresql.org (Postfix) with SMTP id 72ABA925AC9 for ; Fri, 23 May 2003 07:00:17 -0400 (EDT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Fri May 23 13:01:05 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id NAA19067; Fri, 23 May 2003 13:00:15 +0200 (METDST) Message-ID: <3ECDFF3E.22794F33@rodos.fzk.de> Date: Fri, 23 May 2003 13:00:14 +0200 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: kevin@meridianis.com Subject: Re: Another sub-select problem... Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/460 X-Sequence-Number: 13625 > > The "IN(id_list)" portion is derived from a PHP-based recursive query > and is passed into postgres based on user input--always a different list > of ID's. This seems to rule out a "JOIN" as an alternative query type > which has been the general suggestion for avoiding the infamous "IN" > issue which you are working on for 7.4. > You've seen several alternatives already, but my approach would be to populate a temp table with the PHP-based recursive query id_list (the COPY command offers a fast way to do so), and then JOIN on that temp table. Regards, Christoph