Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 861311337B4C for ; Sat, 16 Oct 2010 02:22:52 -0300 (ADT) 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 94274-05 for ; Sat, 16 Oct 2010 05:22:45 +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 2E3D11336DB6 for ; Sat, 16 Oct 2010 02:22:45 -0300 (ADT) 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 o9G5Mg81029560; Sat, 16 Oct 2010 01:22:42 -0400 (EDT) To: Alvaro Herrera cc: Robert Haas , Bruce Momjian , Kris Jurka , pgsql-performance Subject: Re: No hash join across partitioned tables? In-reply-to: <1287205016-sup-542@alvh.no-ip.org> References: <201002252346.o1PNkXG07892@momjian.us> <9477.1267142614@sss.pgh.pa.us> <603c8f071003020816j77b3ec63wbad0415df003c0f1@mail.gmail.com> <17546.1267546998@sss.pgh.pa.us> <1287205016-sup-542@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Sat, 16 Oct 2010 02:03:02 -0300" Date: Sat, 16 Oct 2010 01:22:42 -0400 Message-ID: <29559.1287206562@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: 201010/273 X-Sequence-Number: 40691 Alvaro Herrera writes: > If we analyze the parent, do we also update the children stats, or is it > just that we keep two stats for the parent, one with children and one > without, both being updated when the parent is analyzed? The latter. The trick here is that we need to fire an analyze on the parent even though only its children may have had any updates. > If the latter's the case, maybe we should modify ANALYZE a bit more, so > that we can analyze the whole hierarchy in one go, and store the lot of > stats with a single pass (each child alone, the parent alone, the parent > plus children). However it's not real clear how would this work with > multiple inheritance levels. It's also not clear how it works without blowing out memory... regards, tom lane