On Sun, Jul 19, 2009 at 02:56:04PM +0200, Andreas Kretschmer wrote:
> Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:
> > The problem with just having an index on either column is that it's
> > difficult to combine them and PG hence just thinks that it will be
>
> Since 8.1 PG can do an bitmap index scan using both indexes...
Yes, and with decent stats (as you pointed out) it'll know better when
to do this. Even with better stats it may not help much as there could
be cross-column correlations that are causing PG's estimates to be off.
--
Sam http://samason.me.uk/