Re: Very long deletion time on a 200 GB database

From: Lew <noone(at)lewscanon(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Very long deletion time on a 200 GB database
Date: 2012-02-23 15:42:12
Message-ID: ji5mom$a0s$1@news.albasani.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 02/23/2012 07:28 AM, ktm(at)rice(dot)edu wrote:
> On Thu, Feb 23, 2012 at 05:25:46PM +0200, Reuven M. Lerner wrote:
>>>
>>> What is the distribution of end_dates? It might be worth running this in
>>> several steps, deleting records older than, say, 90 days, 60 days, 30 days.
>>
>> I've suggested something similar, but was told that we have limited
>> time to execute the DELETE, and that doing it in stages might not be
>> possible.
>
> In cases like this, I have often found that doing the delete in smaller
> pieces goes faster, sometimes much faster, than the bigger delete.

For some reason it is common for a conversation with a software manager to go
like this:

Programmer: Let's go with option "A"; it'll be much faster than what we're doing.
Manager: We don't have time to do that.

We don't have time to be faster? When I've had this conversation, the payback
was usually immediate, like it's Wednesday and it'll be faster by Thursday the
next day, and we'll get more done by Friday of the same week the new way. But
we don't have time.

I have had this conversation dozens of times over the years. (I was always
"Programmer".)

--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Steve Crawford 2012-02-23 15:47:36 Re: Very long deletion time on a 200 GB database
Previous Message ktm@rice.edu 2012-02-23 15:28:37 Re: Very long deletion time on a 200 GB database