Re: [PERFORM] Long Running Update - My Solution

2011-06-28 Thread Harry Mantheakis
Hello Kevin > If you use EXPLAIN with both statements... Yes, the plans are indeed very different. Here is the statement, set to update up to 100,000 records, which took about 5 seconds to complete: UPDATE table_A SET field_1 = table_B.field_1 , field_2 = table_B.field_2 FROM table_B

Re: [PERFORM] Long Running Update - My Solution

2011-06-27 Thread Greg Smith
Harry Mantheakis wrote: 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? The way you were doing this originally, it was joining every recor

Re: [PERFORM] Long Running Update - My Solution

2011-06-27 Thread Robert Klemme
On Mon, Jun 27, 2011 at 5:37 PM, wrote: >> 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? > > Hi, there's a lot of possible causes. Us

Re: [PERFORM] Long Running Update - My Solution

2011-06-27 Thread tv
> 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? Hi, there's a lot of possible causes. Usually this is caused by a plan change - imagine

Re: [PERFORM] Long Running Update - My Solution

2011-06-27 Thread Kevin Grittner
Harry Mantheakis 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 rec

Re: [PERFORM] Long Running Update - My Solution

2011-06-27 Thread Harry Mantheakis
I am glad to report that the 'salami-slice' approach worked nicely - all done in about 2.5 hours. Instead of using an all-in-one-go statement, we executed 800 statements, each updating 100,000 records. On average it tool about 10-seconds for each statement to return. This is "thinking out of