Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A3E121337999 for ; Sat, 4 Dec 2010 12:42:12 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 72227-07 for ; Sat, 4 Dec 2010 16:42:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 52CBF1336FA7 for ; Sat, 4 Dec 2010 12:42:05 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oB4Gg49v023793; Sat, 4 Dec 2010 11:42:04 -0500 (EST) To: John Papandriopoulos cc: pgsql-performance@postgresql.org Subject: Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT In-reply-to: References: <14012.1291443654@sss.pgh.pa.us> Comments: In-reply-to John Papandriopoulos message dated "Sat, 04 Dec 2010 01:20:21 -0800" Date: Sat, 04 Dec 2010 11:42:03 -0500 Message-ID: <23792.1291480923@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/38 X-Sequence-Number: 41490 John Papandriopoulos writes: > I've recreated the same example with just one parent table, and 4096 child tables. > SELECT query planning is lightning fast as before; DELETE and UPDATE cause my machine to swap. > What's different about DELETE and UPDATE here? Hmm. Rules? Triggers? You seem to be assuming the problem is at the planner stage but I'm not sure you've proven that. regards, tom lane