Re: Long Running Update - My Solution - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Long Running Update - My Solution
Date
Msg-id 4E085789020000250003EC5E@gw.wicourts.gov
Whole thread Raw
In response to Re: Long Running Update - My Solution  (Harry Mantheakis <harry.mantheakis@riskcontrollimited.com>)
Responses Re: Long Running Update - My Solution
List pgsql-performance
Harry Mantheakis <harry.mantheakis@riskcontrollimited.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

pgsql-performance by date:

Previous
From: Harry Mantheakis
Date:
Subject: Re: Long Running Update - My Solution
Next
From: tv@fuzzy.cz
Date:
Subject: Re: Performance issue with Insert