Skip site navigation (1) Skip section navigation (2)

Re: postgresql is slow with larger table even it is inRAM

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: sathiya psql <sathiya(dot)psql(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: postgresql is slow with larger table even it is inRAM
Date: 2008-03-25 11:59:21
Message-ID: 20080325115921.GB6756@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-performance
sathiya psql escribió:

>     So now everything is in RAM, if i do a count(*) on this table it returns
> 327600 in 3 seconds, why it is taking 3 seconds ????? because am sure that
> no Disk I/O is happening.

It has to scan every page and examine visibility for every record.  Even
if there's no I/O involved, there's a lot of work to do.  I am not sure
if with your hardware it is expected for it to take 3 seconds though.
Do you see high CPU usage during that period?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

pgsql-performance by date

Next:From: Alvaro HerreraDate: 2008-03-25 12:01:01
Subject: Re: what is the maximum number of rows in a table inpostgresql 8.1
Previous:From: sathiya psqlDate: 2008-03-25 11:54:06
Subject: Re: what is the maximum number of rows in a table in postgresql 8.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group