On Feb 16, 2008, at 9:42 , Phoenix Kiula wrote:
> The EXPLAIN tells me it needs to do a seq
> scan. Why is this? How can I make a date/time field index which uses
> both equality criteria and the greater than/lesser than/between
> criteria?
>
The planner will choose a seq scan if it thinks that it will be
faster than using an index: if based on its statistics it thinks a
large portion of rows will match the criteria, a seq scan may well be
faster than an index scan.
Have you analyzed recently? Showing us the EXPLAIN ANALYZE for your
query would be helpful. Have you tried running the EXPLAIN ANALYZE
with seq scans disabled?
Michael Glaesemann
grzm seespotcode net