Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 244CC6338F4 for ; Sun, 10 Jan 2010 10:05:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 42638-07 for ; Sun, 10 Jan 2010 14:04:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wizmail.org (wizmail.org [217.146.107.12]) by mail.postgresql.org (Postfix) with ESMTP id 8BB86632D51 for ; Sun, 10 Jan 2010 10:04:52 -0400 (AST) Received: from ebony.jgh.adsl.wizards.co.uk ([217.146.123.59]) (from_AS 16353) by wizmail.org with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.69) id 1NTyPS-0004Hz-DK (return-path ); Sun, 10 Jan 2010 14:04:50 +0000 Message-ID: <4B49DE7F.8080808@wizmail.org> Date: Sun, 10 Jan 2010 14:04:47 +0000 From: Jeremy Harris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Fedora/2.0.0.21-1.fc9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Choice of bitmap scan over index scan References: In-Reply-To: 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=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/175 X-Sequence-Number: 37055 On 01/10/2010 12:28 PM, Mathieu De Zutter wrote: >Sort (cost=481763.31..485634.61 rows=1548520 width=338) (actual time=5423.628..6286.148 rows=1551923 loops=1) > Sort Key: event_timestamp > Sort Method: external merge Disk: 90488kB > -> Seq Scan on log_event (cost=0.00..79085.92 rows=1548520 width=338) (actual time=0.022..2195.527 rows=1551923 loops=1) > Filter: (event_timestamp > (now() - '1 year'::interval)) > Total runtime: 6407.377 ms Needing to use an external (on-disk) sort method, when taking only 90MB, looks odd. - Jeremy