Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA84134 for ; Thu, 25 May 2000 12:10:41 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id MAA25042; Thu, 25 May 2000 12:08:45 -0400 (EDT) From: Bruce Momjian Message-Id: <200005251608.MAA25042@candle.pha.pa.us> Subject: Re: Use of index in 7.0 vs 6.5 In-Reply-To: <23045.959270628@sss.pgh.pa.us> "from Tom Lane at May 25, 2000 12:03:48 pm" To: Tom Lane Date: Thu, 25 May 2000 12:08:45 -0400 (EDT) CC: "Mikheev, Vadim" , "'Hiroshi Inoue'" , Ryan Bradetich , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200005/145 > Bruce Momjian writes: > > That certainly would make sense. We have hesitated to gather more > > statistics because of the time involved. Fuller statistics on just the > > indexed columns could be a big win and be done fairly quickly because > > the rows are already sorted in the index. > > Yeah, a scan over just the index itself would be a perfect way to > gather stats. The normal objection to it (can't tell whether entries > correspond to currently-valid tuples) doesn't apply, because we don't > really care whether the stats are perfectly accurate. > > Should put this in TODO, along with something about splitting the > ANALYZE function out of VACUUM and making it invokable as a separate > statement. Added: * Remove ANALYZE from VACUUM so it can be run separately without locks * Gather more accurate statistics using indexes -- Bruce Momjian | http://www.op.net/~candle 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