Re: Optimizing POSTGRESQL config

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joanne Formoso <joanneformoso(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Optimizing POSTGRESQL config
Date: 2003-05-01 14:13:56
Message-ID: 16140.1051798436@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Joanne Formoso <joanneformoso(at)yahoo(dot)com> writes:
> I'm new to POSTGRESQL but me and my friend are trying
> to benchmark the database by populating one table with
> 100,000 records, affecting around 5 columns in one
> row. The problem is our processing time is very
> slow...around 30 minutes to 1 hour. There are times
> it just hangs and stop execution. I was just
> wondering if this was normal.

Seems mighty slow --- but it's impossible to really tell with this lack
of information. Show us the table schema, the actual query, and
EXPLAIN's output for the query (or better yet, EXPLAIN ANALYZE),
and then you might get some useful advice.

Of course there's the standard newbie mistake: have you run VACUUM
and/or ANALYZE on this table? You might also care to boost the
shared_buffers setting, which is unreasonably low out-of-the-box.

> We structured our PHP code in such a way that isn't
> optimized in order to isolate possible problems with
> the database.

Are you sure it's not the PHP code that's the problem? One way to
investigate is to watch "top" while running your test. If the php
process is taking more CPU than the postgres backend, then I'd look
to fixing the PHP side first ...

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message radha.manohar 2003-05-01 15:14:38 Re: Installing postgres in home directory
Previous Message Jonathan Wright 2003-05-01 13:07:34 Re: Problem in FOR loop