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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
Cc: mark <markkicks(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: simple update queries take a long time - postgres 8.3.1
Date: 2008-04-01 14:27:06
Message-ID: 1751.1207060026@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl> writes:
> I'd also set
> log_checkpoints=on
> to get an idea how it behaves.

Yeah, that's really the *first* thing to do. You need to determine
whether the episodes of slowness are correlated with checkpoints
or not; there's no point fooling with the checkpoint parameters if
not.

Another thing you could try in order to get a handle on what's
happening is to watch the output of "vmstat 1" or a similar tool,
and see if there are spikes in CPU or I/O load when things are
slow. If not, I'd next look into PG's pg_locks view to see if
queries are getting blocked on locks.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mikeee 2008-04-01 14:29:10 pg_standby/warm standby questions
Previous Message Tom Lane 2008-04-01 14:22:03 Re: [HACKERS] ANALYZE getting dead tuple count hopelessly wrong