X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 428F79F9F74 for ; Tue, 12 Sep 2006 10:45:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 54547-05 for ; Tue, 12 Sep 2006 13:45:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from webmail.enterprisedb.com (edb04.managed.contegix.com [63.246.7.176]) by postgresql.org (Postfix) with ESMTP id 16D2B9FA436 for ; Tue, 12 Sep 2006 10:45:33 -0300 (ADT) Received: from [192.168.0.20] (unknown [62.232.55.118]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by webmail.enterprisedb.com (Postfix) with ESMTP id 085D6A24C7A; Tue, 12 Sep 2006 08:45:31 -0500 (CDT) Message-ID: <4506B9E2.9050608@enterprisedb.com> Date: Tue, 12 Sep 2006 14:45:06 +0100 From: Heikki Linnakangas User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: alvherre@commandprompt.com, Guillaume Cottenceau , pgsql-performance@postgresql.org Subject: Re: Poor performance on seq scan References: <450684EC.4090304@designaproduct.biz> <4506902C.7090407@enterprisedb.com> <4506A9E7.2060303@designaproduct.biz> <87y7spw8v9.fsf@meuh.mnc.lan> <4506B508.80806@enterprisedb.com> <20060912133254.GC11324@alvh.no-ip.org> In-Reply-To: <20060912133254.GC11324@alvh.no-ip.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/82 X-Sequence-Number: 20768 Alvaro Herrera wrote: > Are you saying that an indexscan "Filter" only acts after getting the > heap tuple? If that's the case, then there's room for optimization > here, namely if the affected column is part of the index key, then we > could do the filtering before fetching the heap tuple. That's right. Yes, there's definitely room for optimization. In general, it seems we should detach the index scan and heap fetch more. Perhaps make them two different nodes, like the bitmap index scan and bitmap heap scan. It would allow us to do the above. It's also going to be necessary if we ever get to implement index-only scans. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com