pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: SPMLINGAM <spmlingam@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgresql performance
Date: Wed, 5 Mar 2008 11:39:45 +0100
Message-ID: <20080305103945.GA3673@uio.no> (raw)
In-Reply-To: <15847165.post@talk.nabble.com>
References: <15847165.post@talk.nabble.com>

On Wed, Mar 05, 2008 at 02:27:08AM -0800, SPMLINGAM wrote:
>      I have a table with 50 lakhs records, the table has more then 10
> fields, i have primary key, i have select query with count(*) without any
> condition, it takes 17 seconds.

Without knowing what a "lakhs" record is, it's pretty obvious that you
haven't vacuumed in a very long time. Run VACUUM FULL on your tables, then
instate regular (non-FULL) VACUUMs or enable autovacuum.

/* Steinar */
-- 
Homepage: http://www.sesse.net/



view thread (16+ messages)  latest in thread

Message-ID: <20080305103945.GA3673@uio.no>
Permalink:  ../20080305103945.GA3673@uio.no/
Also on:    postgresql.org/message-id/20080305103945.GA3673@uio.no

 · 

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: sgunderson@bigfoot.com, spmlingam@gmail.com
  Subject: Re: postgresql performance
  In-Reply-To: <20080305103945.GA3673@uio.no>

* 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