Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 481E41337BB4 for ; Tue, 1 Mar 2011 11:34:02 -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 76832-02 for ; Tue, 1 Mar 2011 15:33:55 +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 BDFBE1337B93 for ; Tue, 1 Mar 2011 11:33:54 -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 p21FXpGf017605; Tue, 1 Mar 2011 10:33:51 -0500 (EST) To: Marc Cousin cc: Heikki Linnakangas , pgsql-performance@postgresql.org Subject: Re: inheritance: planning time vs children number vs column number In-reply-to: <201103010842.42128.cousinmarc@gmail.com> References: <201102281038.04945.cousinmarc@gmail.com> <201102281947.46590.cousinmarc@gmail.com> <4188.1298960419@sss.pgh.pa.us> <201103010842.42128.cousinmarc@gmail.com> Comments: In-reply-to Marc Cousin message dated "Tue, 01 Mar 2011 08:42:42 +0100" Date: Tue, 01 Mar 2011 10:33:51 -0500 Message-ID: <17604.1298993631@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: 201103/9 X-Sequence-Number: 42688 Marc Cousin writes: > Le mardi 01 mars 2011 07:20:19, Tom Lane a écrit : >> It's worth pointing out that the only reason this effect is dominating >> the runtime is that you don't have any statistics for these toy test >> tables. If you did, the cycles spent using those entries would dwarf >> the lookup costs, I think. So it's hard to get excited about doing >> anything based on this test case --- it's likely the bottleneck would be >> somewhere else entirely if you'd bothered to load up some data. > Yes, for the same test case, with a bit of data in every partition and > statistics up to date, planning time goes from 20 seconds to 125ms for the 600 > children/1000 columns case. Which is of course more than acceptable. [ scratches head ... ] Actually, I was expecting the runtime to go up not down. Maybe there's something else strange going on here. regards, tom lane