Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 843FD476B24 for ; Thu, 27 Jun 2002 13:54:23 -0400 (EDT) Mailbox-Line: From nickf@ontko.com Thu Jun 27 13:54:23 2002 Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by postgresql.org (Postfix) with ESMTP id 81A934770AF for ; Thu, 27 Jun 2002 12:34:54 -0400 (EDT) Received: from 1cust209.tnt2.richmond.in.da.uu.net ([63.26.248.209] helo=nick) by gull.mail.pas.earthlink.net with smtp (Exim 3.33 #2) id 17NcEJ-0005D8-00; Thu, 27 Jun 2002 09:34:48 -0700 Reply-To: From: "Nick Fankhauser" To: "Tom Lane" Cc: "pgsql-admin" Subject: Re: Are statistics gathered on function indexes? Date: Thu, 27 Jun 2002 11:38:07 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: <22262.1025149046@sss.pgh.pa.us> X-Spam-Status: No, hits=1.4 required=5.0 tests=IN_REP_TO,SUBJ_ENDS_IN_Q_MARK,KNOWN_BAD_DIALUPS, RCVD_IN_MULTIHOP_DSBL,RCVD_IN_OSIRUSOFT_COM, X_RCVD_IN_UNCONFIRMED_DSBL,FUDGE_MULTIHOP_RELAY version=2.30 X-Spam-Level: * X-Archive-Number: 200206/219 X-Sequence-Number: 4653 Tom- Thanks for the info- Based on your response plus some local issues, we're going to work around this by simply creating another column containing the results of the function & then index the column. That gets the results we want without tweaking something we may regret later. Stats for function indexes would be nice, so add our vote for it to wherever such things are tallied to come up with priorities. Regards, -Nick > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Tom Lane > Sent: Wednesday, June 26, 2002 10:37 PM > To: nickf@ontko.com > Cc: pgsql-admin > Subject: Re: [ADMIN] Are statistics gathered on function indexes? > > > "Nick Fankhauser" writes: > > [see subject] > > Nope, they ain't. I agree they should be. > > > Can someone tell me how the cost is estimated for retrieving a > column based > > on a function that is indexed? > > It falls back to a default selectivity estimate, which is something > like 1% or 0.5% (depending on which version you are running). > > > Also, even with 2168 rows to gather, my experience based on cases where > > several thousand rows really are returned indicates that the index would > > still be a good choice. Is there a way to make the planner > favor index scans > > a bit more? (Other than the drastic set enable_seqscan to off.) > > I'd suggest reducing random_page_cost; we've seen a number of anecdotal > reports that the default of 4.0 is too high, though nothing systematic > enough to refute the experiments I did to get that number awhile back. > (IMHO anyway. Others may differ.) > > regards, tom lane > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > >