mark durrant wrote:
> PostgreSQL Machine:
> "Aggregate (cost=140122.56..140122.56 rows=1 width=0)
> (actual time=24516.000..24516.000 rows=1 loops=1)"
> " -> Index Scan using "day" on mtable
> (cost=0.00..140035.06 rows=35000 width=0) (actual
> time=47.000..21841.000 rows=1166025 loops=1)"
> " Index Cond: ("day" = 'Mon'::bpchar)"
> "Total runtime: 24516.000 ms"
Have you run ANALYZE?
Clustering the table on the "day" index (via the CLUSTER command) would
be worth trying.
-Neil