Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E9D01B5DBD6 for ; Mon, 26 Sep 2011 23:45:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 54682-09 for ; Tue, 27 Sep 2011 02:45:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail2.symstream.com (2.102.96.58.static.exetel.com.au [58.96.102.2]) by mail.postgresql.org (Postfix) with ESMTP id 06E13B5DBC8 for ; Mon, 26 Sep 2011 23:45:05 -0300 (ADT) Received: from symstream.com (unknown [192.168.0.254]) by mail2.symstream.com (Postfix) with SMTP id 1D7306ADEC for ; Tue, 27 Sep 2011 12:45:03 +1000 (EST) Received: (qmail 1976 invoked by uid 453); 27 Sep 2011 02:45:01 -0000 X-Virus-Checked: Checked by ClamAV on symstream.com Received: from ajs-desktop.symstream.com (HELO ajs-desktop.symstream.com) (192.168.0.22) by symstream.com (qpsmtpd/0.83) with ESMTP; Tue, 27 Sep 2011 12:45:01 +1000 From: anthony.shipman@symstream.com To: pgsql-performance@postgresql.org Subject: Re: overzealous sorting? Date: Tue, 27 Sep 2011 12:45:00 +1000 User-Agent: KMail/1.9.4 References: <201109261628.15363.anthony.shipman@symstream.com> <20110926113901.38fdf892@marco-dalibo> In-Reply-To: <20110926113901.38fdf892@marco-dalibo> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201109271245.00979.anthony.shipman@symstream.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.17 tagged_above=-10 required=5 tests=BAYES_00=-1.9, KHOP_DYNAMIC=0.73 X-Spam-Level: X-Archive-Number: 201109/377 X-Sequence-Number: 45153 On Monday 26 September 2011 19:39, Marc Cousin wrote: > Because Index Scans are sorted, not Bitmap Index Scans, which builds a > list of pages to visit, to be then visited by the Bitmap Heap Scan step. > > Marc. Where does this bitmap index scan come from? It seems to negate the advantages of b-tree indexes described in the section "Indexes and ORDER BY" of the manual. If I do "set enable_bitmapscan = off;" the query runs a bit faster although with a larger time range it reverts to a sequential scan. -- Anthony Shipman | Consider the set of blacklists that Anthony.Shipman@symstream.com | do not blacklist themselves...