Drew Wilson <drewmwilson@xxxxxxxxx> writes: > I have 2 tables (A,B) joined in a many-to-many relationship via a > join table ("membership"), where updating table A based on table B > takes a very long time. > ... > -> Function Scan on a (cost=0.00..12.50 rows=1000 width=4) I think you've left out some relevant details ... there's nothing in what you said about a set-returning function ... regards, tom lane