Re: simple update queries take a long time - postgres 8.3.1

From: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
To: mark <markkicks(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: simple update queries take a long time - postgres 8.3.1
Date: 2008-04-05 09:39:33
Message-ID: 47F748D5.1090207@batory.org.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/04/2008 05:43 PM, mark wrote:

> stats with new settings are below..

These stats look good for me.

> but even with this sometimes update queries take more than coupla
> seconds sometimes...

> checkpoint_completion_target = 0.8

It looks like that this is set too high for your workload. If you have
spikes of activity then it would be possible that checkpoint will not
end it's work before the next one should be started - I think it would
then halt everything until finished. Try to set it back to 0.5 and observe.

Did you turn on log_checkpoints as recommended? Could you quote your log
lines about checkpoints? Do they correlate with long running queries?

> sometimes INSERT statements are also slow. is there any settings
> can tweak to make INSERT statements fast?

For postgresql update in table data is the same as delete+insert, so the
same optimizations apply.

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
Winnie the Pooh

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2008-04-05 09:43:47 Re: modules
Previous Message Pavel Stehule 2008-04-05 08:05:11 Re: pl/pgsql RECORD data type, how to access to the values