X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 107889DCB95 for ; Sat, 11 Feb 2006 11:47:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43617-05 for ; Sat, 11 Feb 2006 11:47:47 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 628899DCB90 for ; Sat, 11 Feb 2006 11:47:40 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1BFlgVZ007973; Sat, 11 Feb 2006 10:47:42 -0500 (EST) To: Bryce Nesbitt cc: pgsql-sql@postgresql.org Subject: Re: Very slow updates when using IN syntax subselect In-reply-to: <43ED723E.9080305@obviously.com> References: <43ECFF0B.80905@obviously.com> <1682.1139607176@sss.pgh.pa.us> <43ED723E.9080305@obviously.com> Comments: In-reply-to Bryce Nesbitt message dated "Fri, 10 Feb 2006 21:12:30 -0800" Date: Sat, 11 Feb 2006 10:47:42 -0500 Message-ID: <7972.1139672862@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.109 required=5 tests=[AWL=0.109] X-Spam-Score: 0.109 X-Spam-Level: X-Archive-Number: 200602/123 X-Sequence-Number: 24133 Bryce Nesbitt writes: > Tom Lane wrote: >> What does EXPLAIN show for this and for the base query? > -> Seq Scan on event (cost=0.00..0.00 rows=1 width=408) > Filter: (reconciled = false) > select count(*) from event; > ----------- > 116226 It seems pretty clear that you've never vacuumed nor analyzed these tables ... else the planner would have some clue about their sizes. Do that and then see what you get. regards, tom lane