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

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

On Tue, Apr 1, 2008 at 12:44 AM, mark <markkicks(at)gmail(dot)com> wrote:

> On Mon, Mar 31, 2008 at 11:18 PM, Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
> wrote:
>
> > On 2008-03-31 21:16, mark wrote:
> >
> > > is the query I am running , and it takes over 10 seconds to complete
> > > this query...
> > > update users set number_recieved=number_recieved+1 where
> > > uid=738889333;
> >
> > Every time or only sometimes?
>
> i checked again, and it seems to be only sometimes.. and during these
> times there are lot of other queries too running which I can see from
> pg_stat_activity;
>
> Upgrade to 8.3 will help as checkpoint writing algorithms were optimized
> > there for lots of RAM.
>
> I already am running 8.3.1 [ i mentioned in subject]. I am having the
> default settings for those. can you pl. share the settings for check points:
>
> current settings all default
> #checkpoint_segments = 3 # in logfile segments, min 1, 16MB
> each
> #checkpoint_timeout = 5min # range 30s-1h
> #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0-
> 1.0
> #checkpoint_warning = 30s # 0 is off
>

this is what I have on pg_stat_bgwriter ; how much should I increase
checkpoint_segment & checkpoint_completion_target to? thanks a lot!

postgres=# select * from pg_stat_bgwriter;
checkpoints_timed | checkpoints_req | buffers_checkpoint | buffers_clean |
maxwritten_clean | buffers_backend | buffers_alloc
-------------------+-----------------+--------------------+---------------+------------------+-----------------+---------------
42 | 1051 | 8035125 | 21954
| 42 | 241519 | 10394696

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tomasz Ostrowski 2008-04-01 08:48:07 Re: simple update queries take a long time - postgres 8.3.1
Previous Message Simon Riggs 2008-04-01 08:04:21 Re: [HACKERS] ANALYZE getting dead tuple count hopelessly wrong