Received: from gw.acate.com.br ([200.215.17.89]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAELZ9s63429 for ; Tue, 14 Nov 2000 16:35:09 -0500 (EST) (envelope-from edmar@brasmap.com) Received: from joana ([192.168.1.13]) by gw.acate.com.br (8.9.3/8.9.3) with SMTP id TAA04551; Tue, 14 Nov 2000 19:33:30 -0200 From: "Edmar Wiggers" To: "Alvar Freude" , Subject: RE: Using Array-Values in subselect Date: Tue, 14 Nov 2000 19:36:25 -0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <3A11A5EF.C74A40EE@merz-akademie.de> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200011/114 X-Sequence-Number: 145 IMHO you should use another table instead of an array. Forget about reasonable speed when using IN sub-queries, you'll get a sequential scan of the sub-query for every row in the master select. I've heard the EXISTS operator provides far better performance. In 7.1, there's a very nice solution: use the sub-query in the FROM clause and make joins to it. Should be MUCH faster. > But this causes an error because the array field just returns a string > instead of seperated values. Is there a way to make arrays return sort > of "real arrays" or something usable in a subselect in reasonable speed?