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

From: "sathiya psql" <sathiya(dot)psql(at)gmail(dot)com>
To: "Luke Lonergan" <llonergan(at)greenplum(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: postgresql is slow with larger table even it is in RAM
Date: 2008-03-25 15:11:47
Message-ID: f966c2ee0803250811u5fbb621cj7ff4ac903f27bcf0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>
>
> 1st: you should not use a ramdisk for this, it will slow things down as
> compared to simply having the table on disk. Scanning it the first time
> when on disk will load it into the OS IO cache, after which you will get
> memory speed.
>
absolutely....

after getting some replies, i dropped the table from ramdisk,
and started to have that in the disk itself..

>
> 2nd: you should expect the "SELECT COUNT(*)" to run at a maximum of about
> 350 – 600 MB/s (depending on PG version and CPU speed). It is CPU speed
> limited to that rate of counting rows no matter how fast your IO is.
>
am using 8.1
pentium duo core

>
> So, for your 700 MB table, you should expect a COUNT(*) to run in about
> 1-2 seconds best case. This will approximate the speed at which other
> queries can run against the table.
>
ok count(*) per say, but other queries is taking much time...

ok i ll do more experimentations and i ll be back....

Very great thanks for all of your replies GUYZ.....

>
> - Luke
>
>
>
> On 3/25/08 1:35 AM, "sathiya psql" <sathiya(dot)psql(at)gmail(dot)com> wrote:
>
> Dear Friends,
> I have a table with 32 lakh record in it. Table size is nearly 700
> MB, and my machine had a 1 GB + 256 MB RAM, i had created the table space in
> RAM, and then created this table in this RAM.
>
> 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. ( using vmstat i had confirmed, no disk
> I/O is happening, swap is also not used )
>
> Any Idea on this ???
>
> I searched a lot in newsgroups ... can't find relevant things.... (
> because everywhere they are speaking about disk access speed, here i don't
> want to worry about disk access )
>
> If required i will give more information on this.
>
>
>
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Matthew 2008-03-26 12:24:06 Re: what is the maximum number of rows in a table in postgresql 8.1
Previous Message Chris Browne 2008-03-25 15:02:22 Re: postgresql is slow with larger table even it is in RAM