X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id BA028D1B4EC for ; Thu, 11 Sep 2003 04:31:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 52954-01 for ; Thu, 11 Sep 2003 01:31:01 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 91E9FD1B4E7 for ; Thu, 11 Sep 2003 01:31:00 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h8B4UxAn021963; Thu, 11 Sep 2003 00:31:00 -0400 (EDT) To: Christopher Browne Cc: pgsql-performance@postgresql.org Subject: Re: [GENERAL] how to get accurate values in pg_statistic (continued) In-reply-to: <60znhcxp0z.fsf@dev6.int.libertyrms.info> References: <11537.1062717375@sss.pgh.pa.us> <200309101944.h8AJiod26547@candle.pha.pa.us> <60znhcxp0z.fsf@dev6.int.libertyrms.info> Comments: In-reply-to Christopher Browne message dated "Wed, 10 Sep 2003 18:22:04 -0400" Date: Thu, 11 Sep 2003 00:30:59 -0400 Message-ID: <21962.1063254659@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/186 X-Sequence-Number: 3552 Christopher Browne writes: > The "right answer" for most use seems likely to involve: > a) Getting an appropriate number of bins (I suspect 10 is a bit > small, but I can't justify that mathematically), and I suspect that also, but I don't have real evidence for it either. We've heard complaints from a number of people for whom it was indeed too small ... but that doesn't prove it's not appropriate in the majority of cases ... > Does the sample size change if you increase the number of bins? Yes, read the comments in backend/commands/analyze.c. > Do we also need a parameter to control sample size? Not if the paper I read before writing that code is correct. regards, tom lane