From: Lew <noone@lewscanon.com>
To: pgsql-performance@postgresql.org
Subject: Re: Very long deletion time on a 200 GB database
Date: Thu, 23 Feb 2012 07:42:12 -0800
Message-ID: <ji5mom$a0s$1@news.albasani.net> (raw)
In-Reply-To: <20120223152837.GV21114@aart.rice.edu>
References: <4F45FB55.1020600@lerner.co.il>
<CAK61fk6bSQtmDUzm2rNv33kN4Oar_dYZ-yFEa9zR_zLL8L9esQ@mail.gmail.com>
<4F464C49.4050503@dunslane.net>
<4F465A7A.4000905@lerner.co.il>
<20120223152837.GV21114@aart.rice.edu>
On 02/23/2012 07:28 AM, ktm@rice.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: noone@lewscanon.com
Subject: Re: Very long deletion time on a 200 GB database
In-Reply-To: <ji5mom$a0s$1@news.albasani.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox