Re: simple update queries take a long time - postgres 8.3.1 - Mailing list pgsql-general

From Tomasz Ostrowski
Subject Re: simple update queries take a long time - postgres 8.3.1
Date
Msg-id 47F748D5.1090207@batory.org.pl
Whole thread Raw
In response to Re: simple update queries take a long time - postgres 8.3.1  (mark <markkicks@gmail.com>)
List 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

pgsql-general by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: pl/pgsql RECORD data type, how to access to the values
Next
From: Pedro Doria Meunier
Date:
Subject: default value based on select