Skip site navigation (1) Skip section navigation (2)

Re: VERY slow queries at random

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Gunther Mayer <gunther(dot)mayer(at)googlemail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: VERY slow queries at random
Date: 2007-06-07 19:42:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Thu, 7 Jun 2007, Gunther Mayer wrote:

> wal checkpoint config is on pg defaults everywhere, all relevant config 
> options are commented out. I'm no expert in wal stuff but I don't see how 
> that could cause the problem?

Checkpoints are very resource intensive and can cause other processes 
(including your selects) to hang for a considerable period of time while 
they are processing.  With the default parameters, they can happen very 
frequently.  Normally checkpoint_segments and checkpoint_timeout are 
increased in order to keep this from happening.

This would normally be an issue only if you're writing a substantial 
amount of data to your tables.  If there are a lot of writes going on, you 
might get some improvement by adjusting those parameters upward; the 
defaults are pretty low.  Make sure you read first so 
you know what you're playing with, there are some recovery implications 

* Greg Smith gsmith(at)gregsmith(dot)com Baltimore, MD

In response to


pgsql-performance by date

Next:From: Tyrrill, EdDate: 2007-06-07 20:02:55
Subject: Best way to delete unreferenced rows?
Previous:From: Greg SmithDate: 2007-06-07 19:26:58
Subject: Re: Getting Slow

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group