pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Elvis Henríquez <henriquez.elvis@gmail.com>
To: sathiya psql <sathiya.psql@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: postgresql is slow with larger table even it is in RAM
Date: Fri, 28 Mar 2008 06:05:40 +1930
Message-ID: <493343bd0803270335i59c2ba65yded0a1c11982b384@mail.gmail.com> (raw)
In-Reply-To: <f966c2ee0803250148i526f0669w97c583aa03dcf2f3@mail.gmail.com>
References: <f966c2ee0803250136j2b44a10j4fb54afbee3ed8ed@mail.gmail.com>
	<20080325094147.40317ea2@twoflower.in.publishing.hu>
	<f966c2ee0803250148i526f0669w97c583aa03dcf2f3@mail.gmail.com>

We could notice your processor is an Intel Celeron. They have a small cache,
as you can see for yourself in your output.

But, what about postgresql.conf ? How many memory resources are being
assigned in your configuration?

If you only have 1.25 GB of RAM and you're creating a tablespace in RAM
which holds a table about 0.8 GB in size, and have created indexes in the
same tablespace in RAM, you could be getting out of RAM. vmstat says you're
not using swap, but if you leave the postgresql process only ~100 MB of RAM,
it surely will have a bad performance.

Once the server is up and running, which is the output of free ?

Which tool are you using to retrieve data ? psql is pretty much faster than
phpPgAdmin and this one is faster than pgAdmin.

Elvis E. Henríquez A.

On Wed, Mar 26, 2008 at 4:18 AM, sathiya psql <sathiya.psql@gmail.com>
wrote:

>
>
> On Tue, Mar 25, 2008 at 2:11 PM, CZUCZY Gergely <
> gergely.czuczy@harmless.hu> wrote:
>
> > May I ask, do you have any indeces or a primary key on that table?
> >
> yes, i have both the index and primary key on a column "id",
> and am doing the
>
> SELECT count(id) from TABLE;
>
> this is taking 3 seconds
>

view thread (8+ messages)

Message-ID: <493343bd0803270335i59c2ba65yded0a1c11982b384@mail.gmail.com>
Permalink:  ../493343bd0803270335i59c2ba65yded0a1c11982b384@mail.gmail.com/
Also on:    postgresql.org/message-id/493343bd0803270335i59c2ba65yded0a1c11982b384@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: henriquez.elvis@gmail.com, sathiya.psql@gmail.com
  Subject: Re: postgresql is slow with larger table even it is in RAM
  In-Reply-To: <493343bd0803270335i59c2ba65yded0a1c11982b384@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox