Re: [PERFORM] Duplicate deletion optimizations

2012-01-08 Thread Jochen Erwied
Saturday, January 7, 2012, 1:21:02 PM you wrote: > where t_imp.id is null and test.id=t_imp.id; > => > where t_imp.id is not null and test.id=t_imp.id; You're right, overlooked that one. But the increase to execute the query is - maybe not completely - suprisingly minimal. Because the quer

Re: [PERFORM] Duplicate deletion optimizations

2012-01-08 Thread Strange, John W
Are your stats updated on the table after you added the index? - run the bad query with explain verbose on (you should send this anyways) - check to see what the difference is in expected rows vs. actual rows - make sure that your work_mem is high enough if you are sorting, if not you'll see it w

Re: [PERFORM] Duplicate deletion optimizations

2012-01-08 Thread Pierre C
That's almost identical to my tables. You explained your problem very well ;) I certainly will. Many thanks for those great lines of SQL! You're welcome ! Strangely I didn't receive the mail I posted to the list (received yours though). -- Sent via pgsql-performance mailing list (pgsql-p