X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0BBECD6D17 for ; Fri, 11 Nov 2005 07:57:00 -0400 (AST) 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 85304-10 for ; Fri, 11 Nov 2005 11:56:56 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id 3445ED6D29 for ; Fri, 11 Nov 2005 07:56:58 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id CDBD740C4ED; Fri, 11 Nov 2005 11:55:26 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id DB8A015F97; Fri, 11 Nov 2005 11:51:58 +0000 (GMT) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09495-02; Fri, 11 Nov 2005 11:51:55 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 9AA8015F8F; Fri, 11 Nov 2005 11:51:55 +0000 (GMT) Message-ID: <437485DB.50005@archonet.com> Date: Fri, 11 Nov 2005 11:51:55 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mitch Skinner Cc: Tom Lane , pgsql-performance@postgresql.org Subject: Re: same plan, add 1 condition, 1900x slower References: <1131630176.29496.91.camel@enzian> <10164.1131643400@sss.pgh.pa.us> <1131700635.29496.136.camel@enzian> In-Reply-To: <1131700635.29496.136.camel@enzian> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.031 required=5 tests=[AWL=0.031] X-Spam-Score: 0.031 X-Spam-Level: X-Archive-Number: 200511/204 X-Sequence-Number: 15461 Mitch Skinner wrote: > > The version with the condition is definitely doing more I/O. The > version without the condition doesn't read at all. [snip] > relname | relpages | reltuples > -----------------------------+----------+------------- > external_id_map | 126883 | 1.55625e+07 > external_id_map_primary_key | 64607 | 1.55625e+07 > subject | 31 | 1186 > subject_pkey | 19 | 1186 Does external_id_map really have 15 million rows? If not, try a VACUUM FULL on it. Be prepared to give it some time to complete. -- Richard Huxton Archonet Ltd