Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 93692476149 for ; Fri, 28 Jun 2002 14:33:05 -0400 (EDT) Mailbox-Line: From pgman@candle.pha.pa.us Fri Jun 28 14:33:05 2002 Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id C5E8F475E6C for ; Fri, 28 Jun 2002 14:30:24 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g5SIU3g19814; Fri, 28 Jun 2002 14:30:03 -0400 (EDT) From: Bruce Momjian Message-Id: <200206281830.g5SIU3g19814@candle.pha.pa.us> Subject: Re: Are statistics gathered on function indexes? In-Reply-To: <3612.1025272862@sss.pgh.pa.us> To: Tom Lane Date: Fri, 28 Jun 2002 14:30:02 -0400 (EDT) Cc: Ray Ontko , pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL97 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, hits=-3.5 required=5.0 tests=IN_REP_TO,SUBJ_ENDS_IN_Q_MARK version=2.30 X-Spam-Level: X-Archive-Number: 200206/238 X-Sequence-Number: 4671 Tom Lane wrote: > As you can see, the estimate drops off by about a factor of 90 per > added character. This is probably too much, but it's not that easy > to determine what the ratio ought to be. The critical code involved > in this is convert_string_to_scalar in backend/utils/adt/selfuncs.c; > the ratio per character is essentially the same as the character range > that it induces from the available values. Feel free to propose a > better implementation if you can think of one. FYI, 7.3 will drop off quicker than <=7.2.X: * Change FIXED_CHAR_SEL to 0.20 from 0.04 to give better selectivity (Bruce) -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026