pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: sathiya psql <sathiya.psql@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgresql is slow with larger table even it is in RAM
Date: Tue, 25 Mar 2008 10:08:23 +0100
Message-ID: <20080325090823.GA5431@depesz.com> (raw)
In-Reply-To: <f966c2ee0803250135h57ba1d5bs41f77616ae7186dc@mail.gmail.com>
References: <f966c2ee0803250135h57ba1d5bs41f77616ae7186dc@mail.gmail.com>

On Tue, Mar 25, 2008 at 02:05:20PM +0530, sathiya psql wrote:
> Any Idea on this ???

yes. dont use count(*).

if you want whole-table row count, use triggers to store the count.

it will be slow. regeardless of whether it's in ram or on hdd.

depesz

-- 
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)



view thread (13+ messages)  latest in thread

Message-ID: <20080325090823.GA5431@depesz.com>
Permalink:  ../20080325090823.GA5431@depesz.com/
Also on:    postgresql.org/message-id/20080325090823.GA5431@depesz.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-performance@postgresql.org
  Cc: depesz@depesz.com, sathiya.psql@gmail.com
  Subject: Re: postgresql is slow with larger table even it is in RAM
  In-Reply-To: <20080325090823.GA5431@depesz.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