From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Apparently useless bitmap scans
Date: Wed, 09 May 2007 11:56:13 -0400
Message-ID: <27552.1178726173@sss.pgh.pa.us> (raw)
In-Reply-To: <200705091726.03455.peter_e@gmx.net>
References: <200705091410.57312.peter_e@gmx.net>
<20070509142914.GD4504@alvh.no-ip.org>
<200705091726.03455.peter_e@gmx.net>
Peter Eisentraut <peter_e@gmx.net> writes:
> OK, upgrading to 8.2.4 fixes this odd plan choice. The query does run
> a bit faster too, but the cost estimate has actually gone up!
Yeah, because the former code was making an unrealistically small
estimate of the number of tuples found by BitmapAnd (due to
double-counting the selectivities of redundant indexes), and of course
that means a smaller estimate of the cost to fetch them in the bitmap
heap scan.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net, alvherre@commandprompt.com
Subject: Re: Apparently useless bitmap scans
In-Reply-To: <27552.1178726173@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox