Re: [PERFORM] Efficient Correlated Update

2013-08-09 Thread Robert DiFalco
Well, heh I'm no SQL expert. I kinda piece things together the best I can from what I can read and this was really the only way I could make the UPDATE work correctly. But the plan looks complicated with a lot of hash conditions, hash joins, and scans. I'm worried it wont perform with a very large

Re: [PERFORM] Efficient Correlated Update

2013-08-09 Thread Igor Neyman
> -Original Message- > From: pgsql-performance-ow...@postgresql.org [mailto:pgsql- > performance-ow...@postgresql.org] On Behalf Of Kevin Grittner > Sent: Friday, August 09, 2013 11:44 AM > To: Robert DiFalco; pgsql-performance@postgresql.org > Subject: Re: [PERFORM] Efficient Correlated Up

Re: [PERFORM] Efficient Correlated Update

2013-08-09 Thread Klaus Ita
I sometimes experience that updating smaller sets is more efficient than doing all at once in one transaction (talking about 1+) Always make sure the update references can make use of indices On Fri, Aug 9, 2013 at 5:44 PM, Kevin Grittner wrote: > Robert DiFalco wrote: > > > In my system

Re: [PERFORM] Efficient Correlated Update

2013-08-09 Thread Kevin Grittner
Robert DiFalco wrote: > In my system a user can have external contacts. When I am > bringing in external contacts I want to correlate any other > existing users in the system with those external contacts. A > users external contacts may or may not be users in my system. I > have a user_id field i