X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 28F7011F7CAF for ; Tue, 11 Apr 2006 19:13:19 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -0.002 X-Spam-Level: X-Spam-Status: No, score=-0.002 required=5 tests=[SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id G95nFiXu+bQN for ; Tue, 11 Apr 2006 19:13:13 -0300 (ADT) 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 47A1311F7ACD for ; Tue, 11 Apr 2006 18:29:27 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3BLTN5V011016; Tue, 11 Apr 2006 17:29:23 -0400 (EDT) To: Dan Harris cc: PostgreSQL Performance Subject: Re: Encouraging multi-table join order In-reply-to: <443C1DEC.4080307@drivefaster.net> References: <443AAC26.4070802@drivefaster.net> <1543.1144710756@sss.pgh.pa.us> <443AEF9B.3000909@drivefaster.net> <2406.1144717297@sss.pgh.pa.us> <443C18AA.3000500@drivefaster.net> <10770.1144789733@sss.pgh.pa.us> <443C1DEC.4080307@drivefaster.net> Comments: In-reply-to Dan Harris message dated "Tue, 11 Apr 2006 15:21:48 -0600" Date: Tue, 11 Apr 2006 17:29:23 -0400 Message-ID: <11015.1144790963@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/246 X-Sequence-Number: 18330 Dan Harris writes: > I wonder why the estimates were so far off the first time? This table > has been ANALYZED regularly ever since creation. Probably just that you need a bigger sample size for such a large table. We've been arguing ever since 7.2 about what the default statistics target ought to be --- a lot of people think 10 is too small. (It could also be that the fixed 300X multiplier ought to depend on table size instead. The math that told us 300X was OK was really about getting the histogram right, not about whether the most-common-values stats would be any good.) regards, tom lane