Re: postgresql is slow with larger table even it is in RAM

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: postgresql is slow with larger table even it is in RAM
Date: 2008-03-25 15:02:22
Message-ID: 603aqe979d.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

sathiya(dot)psql(at)gmail(dot)com ("sathiya psql") writes:
> On Tue, Mar 25, 2008 at 2:09 PM, jose javier parra sanchez <jojapasa(at)gmail(dot)com> wrote:
>
>
> It's been said zillions of times on the maillist. Using a select
> count(*) in postgres is slow, and probably will be slow for a long
> time. So that function is not a good way to measure perfomance.
>
>
>
> Yes, but if the data is in HDD then we can say this...
> but now the data is in RAM

Even if the data all is in RAM, it will still take some definitely
non-zero time to examine all of the pages, looking for tuples, and
then to determine which of those tuples are visible from the
perspective of your DB connection.

If 500MB of relevant data is sitting on disk, then it will take
whatever time it takes to pull it from disk; if it is in memory, there
is still work to be done...
--
select 'cbbrowne' || '@' || 'cbbrowne.com';
http://linuxdatabases.info/info/finances.html
Rules of the Evil Overlord #76. "If the hero runs up to my roof, I
will not run up after him and struggle with him in an attempt to push
him over the edge. I will also not engage him at the edge of a
cliff. (In the middle of a rope-bridge over a river of molten lava is
not even worth considering.)" <http://www.eviloverlord.com/>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message sathiya psql 2008-03-25 15:11:47 Re: postgresql is slow with larger table even it is in RAM
Previous Message Luke Lonergan 2008-03-25 14:46:02 Re: postgresql is slow with larger table even it is in RAM