Re: Why does query planner choose slower BitmapAnd ? - Mailing list pgsql-general

From Stephen Frost
Subject Re: Why does query planner choose slower BitmapAnd ?
Date
Msg-id 20160222193325.GF13092@tamriel.snowman.net
Whole thread Raw
In response to Re: Why does query planner choose slower BitmapAnd ?  (Seamus Abshere <seamus@abshere.net>)
List pgsql-general
* Seamus Abshere (seamus@abshere.net) wrote:
> Is there any other way to differentiate the 2 index scans? FWIW, 10% of
> houses are phoneable, 0.2% are in the city. (Maybe I'm just supposed to
> drop the index like Tom said.)

Have to admit that I continue to be interested in this as it might
relate to the somewhat similar (or, at least, seems to be, to me) case
that I ran into before.

What might be interesting would be to see a run with:

explain (analyze, verbose, buffers) select ...

for both of the original queries.  It'd also be nice to know what the
size is of each of the indexes involved.

Last, but perhaps not least, have you considered using a partial index
and only indexing where phoneable is actually true?  That would remove
the need to update the index for the case where phoneable is false and
would make the index smaller.  I don't know that it'd really change
what's going on here, though if it did, that would be interesting too.

Thanks!

Stephen

Attachment

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: decoding BLOB's
Next
From: John R Pierce
Date:
Subject: Re: decoding BLOB's