check explain analyze
tried this on 8.3 with real life data:
-- all rows, index useless
explain analyze select id from cl_customer where modified > '2008-01-01'
Seq Scan on cl_customer (cost=0.00..38958.79 rows=1448639 width=8)
(actual time=0.030..682.940 rows=1448783 loops=1)
Filter: (modified > '2008-01-01 00:00:00'::timestamp without time zone)
Total runtime: 1015.394 ms
-- small subset
explain analyze select id from cl_customer where modified > '2009-01-01'
Index Scan using i_cl_customer_modified on cl_customer
(cost=0.00..12.93 rows=144 width=8) (actual time=0.018..0.110 rows=175
loops=1)
Index Cond: (modified > '2009-01-01 00:00:00'::timestamp without time
zone)
Total runtime: 0.169 ms
Phoenix Kiula schrieb:
> Thanks. But it used to work without this, and more importantly, this
> doesn't explain why the ">" queries are so exceedingly slow now! Any
> thoughts?
>