Skip site navigation (1) Skip section navigation (2)

Re: Need help in setting optimal configuration for a huge

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Kishore B <kishorebh(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Need help in setting optimal configuration for a huge
Date: 2005-10-23 10:04:07
Message-ID: Pine.LNX.4.44.0510231200490.11189-100000@zigo.dhs.org (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-performance
On Sun, 23 Oct 2005, Kishore B wrote:

> We need to insert into the bigger table almost for every second , through
> out the life time. In addition, we receive at least 200,000 records a day at
> a fixed time.
> 
> We are facing a* critical situation because of the performance of the **
> database**.* Even a basic query like select count(*) from bigger_table is
> taking about 4 minutes to return.

Count(*) like that always scans the full table, but 4 minutes still sound
like a lot.  How often do you vacuum? Could it be that the disk is full of
garbage due to not enough vacuum?

A query like this can help find bloat:

 SELECT oid::regclass, reltuples, relpages FROM pg_class ORDER BY 3 DESC;

I assume to do updates and deletes as well, and not just inserts?

-- 
/Dennis Björklund


In response to

pgsql-performance by date

Next:From: Steinar H. GundersonDate: 2005-10-23 10:23:33
Subject: Re: Materializing a sequential scan
Previous:From: Bruno Wolff IIIDate: 2005-10-23 06:51:36
Subject: Re: prepared transactions that persist across sessions?

pgsql-admin by date

Next:From: sualeh.fatehiDate: 2005-10-23 16:06:23
Subject: Re: Monitoring database for changes - backup purposes
Previous:From: Kishore BDate: 2005-10-23 02:05:50
Subject: Re: Need help in setting optimal configuration for a huge database.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group