Re: Long Running Update - My Solution

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-performance(at)postgresql(dot)org>, "Harry Mantheakis" <harry(dot)mantheakis(at)riskcontrollimited(dot)com>
Subject: Re: Long Running Update - My Solution
Date: 2011-06-27 15:12:25
Message-ID: 4E085789020000250003EC5E@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Harry Mantheakis <harry(dot)mantheakis(at)riskcontrollimited(dot)com> wrote:

> I am glad to report that the 'salami-slice' approach worked nicely
> - all done in about 2.5 hours.

Glad to hear it!

> The mystery remains, for me: why updating 100,000 records could
> complete in as quickly as 5 seconds, whereas an attempt to update
> a million records was still running after 25 minutes before we
> killed it?

If you use EXPLAIN with both statements (without ANALYZE, since you
probably don't want to trigger an actual *run* of the statement), is
there a completely different plan for the range covering each? If
so, a severe jump like that might mean that your costing parameters
could use some adjustment, so that it switches from one plan to the
other closer to the actual break-even point.

> One thing remains crystal clear: I love Postgresql :-)

:-)

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message tv 2011-06-27 15:32:10 Re: Performance issue with Insert
Previous Message Harry Mantheakis 2011-06-27 15:02:02 Re: Long Running Update - My Solution