From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Seamus Abshere <seamus(at)abshere(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Why does query planner choose slower BitmapAnd ? |
Date: | 2016-02-22 19:33:25 |
Message-ID: | 20160222193325.GF13092@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
* Seamus Abshere (seamus(at)abshere(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2016-02-22 19:37:39 | Re: decoding BLOB's |
Previous Message | Joshua D. Drake | 2016-02-22 19:23:31 | Re: decoding BLOB's |