Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 11E019FB65E for ; Mon, 9 Apr 2007 18:43:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70671-01 for ; Mon, 9 Apr 2007 18:43:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 194079FB610 for ; Mon, 9 Apr 2007 18:43:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l39LhgRw014020; Mon, 9 Apr 2007 17:43:42 -0400 (EDT) To: Drew Wilson cc: pgsql-performance@postgresql.org Subject: Re: how to efficiently update tuple in many-to-many relationship? In-reply-to: <233A9987-ABA5-4491-A304-FDA1F8FCD962@gmail.com> References: <233A9987-ABA5-4491-A304-FDA1F8FCD962@gmail.com> Comments: In-reply-to Drew Wilson message dated "Mon, 09 Apr 2007 13:46:59 -0700" Date: Mon, 09 Apr 2007 17:43:42 -0400 Message-ID: <14019.1176155022@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/218 X-Sequence-Number: 24095 Drew Wilson 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