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