Re: Oddly slow queries - Mailing list pgsql-performance

From Thomas Spreng
Subject Re: Oddly slow queries
Date
Msg-id 3D0211BE-8936-4705-964F-42E31263D88A@socket.ch
Whole thread Raw
In response to Re: Oddly slow queries  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: Oddly slow queries  (PFC <lists@peufeu.com>)
List pgsql-performance
On 19.04.2008, at 19:04, Scott Marlowe wrote:
>>> No, that will certainly NOT just affect write performance; if the
>>> postmaster is busy writing out checkpoints, that will block SELECT
>>> queries that are accessing whatever is being checkpointed.
>>>
>>
>> What I meant is if there are no INSERT's or UPDATE's going on it
>> shouldn't
>> affect SELECT queries, or am I wrong?
>
> But checkpoints only occur every 10 seconds because of a high insert /
> update rate.  So, there ARE inserts and updates going on, and a lot of
> them, and they are blocking your selects when checkpoint hits.
>
> While adjusting your background writer might be called for, and might
> provide you with some relief, you REALLY need to find out what's
> pushing so much data into your db at once that it's causing a
> checkpoint storm.

that's correct, there are nightly (at least at the moment) processes
that
insert around 2-3 mio rows and delete about the same amount. I can see
that
those 'checkpoints are occurring too frequently' messages are only
logged
during that timeframe.

I assume that it's normal that so many INSERT's and DELETE's cause the
background writer to choke a little bit. I guess I really need to
adjust the
processes to INSERT and DELETE rows in a slower pace if I want to do
other
queries during the same time.

cheers,

tom

pgsql-performance by date:

Previous
From: Mark Mielke
Date:
Subject: Re: Group by more efficient than distinct?
Next
From: PFC
Date:
Subject: Re: Oddly slow queries