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 47F1D3BC.5090405@batory.org.pl
Whole thread Raw
In response to simple update queries take a long time - postgres 8.3.1  (mark <markkicks@gmail.com>)
Responses Re: simple update queries take a long time - postgres 8.3.1  (mark <markkicks@gmail.com>)
List pgsql-general
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?

If it is sometimes then I think this query is waiting for a checkpoint.
If I'm right then you'll have to tune Postgres to do them more often, so
that there is less work to do each time. You use 4GB of shared buffers
so write-busy database can write gigabytes of data on each checkpoint,
which can take seconds.

Upgrade to 8.3 will help as checkpoint writing algorithms were optimized
there for lots of RAM.

Read this for more info and tuning tips:
http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm

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: "Pettis, Barry"
Date:
Subject: Re: Using tables in other PostGreSQL database
Next
From: "Pavan Deolasee"
Date:
Subject: Re: [HACKERS] ANALYZE getting dead tuple count hopelessly wrong