From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Greg Stark <gsstark(at)MIT(dot)EDU> |
Cc: | Alex Adriaanse <alex(at)innovacomputing(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Bad row estimates |
Date: | 2006-03-04 08:15:02 |
Message-ID: | 87r75isk1l.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Greg Stark <gsstark(at)MIT(dot)EDU> writes:
> The "now() BETWEEN test_table_1.start_ts AND test_table_1.end_ts can't be
> answered completely using a btree index. You could try using a GIST index here
> but I'm not clear how much it would help you (or how much work it would be).
To add to my own comment you could also try creating two separate indexes on
start_ts and end_ts. Postgres can combine the two indexes using a bitmap scan.
It's not a complete solution like a GIST index would be though.
It also doesn't help at all with the planner estimating how many records will
actually match.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Joost Kraaijeveld | 2006-03-04 09:58:03 | How to query and index for customer with lastname and city |
Previous Message | Greg Stark | 2006-03-04 07:01:35 | Re: Bad row estimates |