Re: Apparently useless bitmap scans - Mailing list pgsql-performance

From Tom Lane
Subject Re: Apparently useless bitmap scans
Date
Msg-id 27552.1178726173@sss.pgh.pa.us
Whole thread Raw
In response to Re: Apparently useless bitmap scans  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Apparently useless bitmap scans
Next
From: Peter Eisentraut
Date:
Subject: Re: Nested loops overpriced