index usage makes problem

From: "sathiya psql" <sathiya(dot)psql(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: index usage makes problem
Date: 2008-03-06 08:16:13
Message-ID: f966c2ee0803060016j59b52fceq29225bc54a762537@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I had 50 lakh records in my table...

while counting that am using that row in where condition... which makes
problem, cpu is waiting for device...

Debian OS, postresql 7.4, 50 lakh records.

Query is

EXPLAIN ANALYZE select count(call_id) from call_log where call_id > 1;

while seeing the top, cpu is waiting for i/o, and without this call_id
condition if i do
EXPLAIN ANALYZE select count(oid) from call_log where oid > 1;
it executed in 21 seconds....

Browse pgsql-performance by date

  From Date Subject
Next Message Dave Cramer 2008-03-06 11:50:17 Re: count * performance issue
Previous Message Theo Kramer 2008-03-06 07:21:36 Re: oid...any optimizations