Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id BB9286323F4 for ; Wed, 9 Jun 2010 17:11:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 25116-03 for ; Wed, 9 Jun 2010 20:11:33 +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 9166363531F for ; Wed, 9 Jun 2010 17:11:30 -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 o59KBQnZ000490; Wed, 9 Jun 2010 16:11:26 -0400 (EDT) To: Robert Haas cc: Bruce Momjian , Kris Jurka , pgsql-performance@postgresql.org Subject: Re: No hash join across partitioned tables? In-reply-to: References: <201002252346.o1PNkXG07892@momjian.us> <9477.1267142614@sss.pgh.pa.us> <603c8f071003020816j77b3ec63wbad0415df003c0f1@mail.gmail.com> <17546.1267546998@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 09 Jun 2010 15:47:55 -0400" Date: Wed, 09 Jun 2010 16:11:25 -0400 Message-ID: <489.1276114285@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: 201006/139 X-Sequence-Number: 38995 Robert Haas writes: > In going back through emails I had marked as possibly needing another > look before 9.0 is released, I came across this issue again. As I > understand it, analyze (or analyse) now collects statistics for both > the parent individually, and for the parent and its children together. > However, as I further understand it, autovacuum won't actually fire > off an analyze unless there's enough activity on the parent table > considered individually to warrant it. So if you have an empty parent > and a bunch of children with data in it, your stats will still stink, > unless you analyze by hand. Check. > Assuming my understanding of the problem is correct, we could: > (a) fix it, > (b) document that you should consider periodic manual analyze commands > in this situation, or > (c) do nothing. > Thoughts? The objections to (a) are that it might result in excessive ANALYZE work if not done intelligently, and that we haven't got a patch ready anyway. I would have liked to get to this for 9.0 but I feel it's a bit late now. regards, tom lane