Simon Riggs wrote:
> postgres=# explain analyze select count(*) from accounts;
> QUERY PLAN
>
------------------------------------------------------------------------------------------------------------------------
> Aggregate (cost=2890.00..2890.01 rows=1 width=0) (actual
> time=0.000..690.780 rows=1 loops=1)
> -> Seq Scan on accounts (cost=0.00..2640.00 rows=100000 width=0)
> (actual time=0.000..2672.562 rows=100000 loops=1)
> Total runtime: 734.474 ms
> (3 rows)
>
> Time: 891.822 ms
Wow, that is slow. Maybe a problem in the kernel? Perhaps something
similar to this:
http://www.ussg.iu.edu/hypermail/linux/kernel/0603.2/index.html#1282
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.