X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DA9F832C0CE for ; Fri, 15 Oct 2004 11:36:41 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64632-07 for ; Fri, 15 Oct 2004 10:36:35 +0000 (GMT) Received: from bayswater1.ymogen.net (host-154-240-27-217.pobox.net.uk [217.27.240.154]) by svr1.postgresql.org (Postfix) with ESMTP id 68EF8329FB1 for ; Fri, 15 Oct 2004 11:36:36 +0100 (BST) Received: from solent (unknown [213.165.136.10]) by bayswater1.ymogen.net (Postfix) with ESMTP id 22D4BA3244; Fri, 15 Oct 2004 11:36:35 +0100 (BST) Reply-To: From: "Matt Clark" To: "'Bernd'" , Subject: Re: Select with qualified join condition / Batch inserts Date: Fri, 15 Oct 2004 11:36:35 +0100 Organization: Ymogen Ltd Message-ID: <001e01c4b2a2$d82b77f0$8300a8c0@solent> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: <200410151225.26083.bernd_pg@genedata.com> Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=UPPERCASE_50_75 X-Spam-Level: * X-Archive-Number: 200410/212 X-Sequence-Number: 8688 > SELECT cmp.WELL_INDEX, cmp.COMPOUND, con.CONCENTRATION > FROM SCR_WELL_COMPOUND cmp, SCR_WELL_CONCENTRATION con > WHERE cmp.BARCODE=con.BARCODE > AND cmp.WELL_INDEX=con.WELL_INDEX > AND cmp.MAT_ID=con.MAT_ID > AND cmp.MAT_ID = 3 > AND cmp.BARCODE='910125864' > AND cmp.ID_LEVEL = 1; Quick guess - type mismatch forcing sequential scan. Try some quotes: AND cmp.MAT_ID = '3' AND cmp.BARCODE='910125864' AND cmp.ID_LEVEL = '1'; M