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

Re: Oddly slow queries

From: Thomas Spreng <spreng(at)socket(dot)ch>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: "Chris Browne" <cbbrowne(at)acm(dot)org>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Oddly slow queries
Date: 2008-04-22 09:48:01
Message-ID: 3D0211BE-8936-4705-964F-42E31263D88A@socket.ch (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-performance by date

Next:From: PFCDate: 2008-04-22 10:29:29
Subject: Re: Oddly slow queries
Previous:From: Mark MielkeDate: 2008-04-22 01:39:15
Subject: Re: Group by more efficient than distinct?

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