Re: pgstattuple extension for indexes

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgstattuple extension for indexes
Date: 2006-08-17 21:10:45
Message-ID: 20060817211045.GA5710@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Thu, Aug 17, 2006 at 02:54:20PM -0500, Jim C. Nasby wrote:
> On Thu, Aug 17, 2006 at 02:23:48PM +0200, Martijn van Oosterhout wrote:
> > On Thu, Aug 17, 2006 at 12:55:28PM +0900, ITAGAKI Takahiro wrote:
> > > But the method has the above problem. So I suggest to use whether
> > > the right link points to the next adjacent page or not.
> > >
> > > if (opaque->btpo_next != P_NONE && opaque->btpo_next != blkno + 1)
> > > stat->fragments++;
> > >
> > > Do you think which method is better? Or do you have other ideas?
>
> Ok, fine... expand the example out to an index that's not trivial in
> size. Even with read-ahead, once you get to a few megs (which is
> obviously not that big), you're seeking.

Well, mostly I'm just saying that only matching on the next block
number is going to give unrealistically low numbers. We can't ignore OS
level caching, the way Postgres works relies on it in many ways.

I'd suggest something like: btpo_next between blkno and blkno + X, to
try to take into account caching. But I'm not sure that will give
numbers significantly different from what is already generated.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2006-08-17 21:29:04 Re: Autovacuum on by default?
Previous Message Alvaro Herrera 2006-08-17 20:40:46 Re: BugTracker (Was: Re: 8.2 features status)

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-17 23:11:25 Re: [PATCHES] WIP archive_timeout patch
Previous Message Jim C. Nasby 2006-08-17 20:17:10 Re: Going for "all green" buildfarm results