This table is vacuumed and analyzed every hour, so yes, it's been
analyzed recently.
These are the EXPLAIN ANALYZE outputs for both the equality condition
and the greater than condition:
orguser=# explain analyze select alias from clientswhere modify_date =
'2008-01-01' ;
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
Index Scan using new_idx_modify_date on clients (cost=0.00..30.23
rows=8 width=10) (actual time=0.136..0.136 rows=0 loops=1)
Index Cond: (modify_date = '2008-01-01 00:00:00'::timestamp without
time zone)
Total runtime: 0.220 ms
(3 rows)
Time: 2.832 ms
orguser=# explain analyze select alias from clientswhere modify_date >
'2008-01-01' ;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------
Seq Scan on clients (cost=0.00..237043.09 rows=136617 width=10)
(actual time=0.391..4007.188 rows=148225 loops=1)
Filter: (modify_date > '2008-01-01 00:00:00'::timestamp without time zone)
Total runtime: 4539.242 ms
(3 rows)
Time: 4539.850 ms
Welcome any thoughts. Thanks!