Re: Including Snapshot Info with Indexes

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
Cc: Trevor Talbot <quension(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Including Snapshot Info with Indexes
Date: 2007-10-20 08:30:43
Message-ID: 20071020083043.GA28565@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sat, Oct 20, 2007 at 09:24:07AM +0530, Gokulakannan Somasundaram wrote:
> Hi,
> I think i have a initial Implementation. It has some bugs and i am working
> on fixing it. But to show the advantages, I want to show the number of
> Logical I/Os on the screen. In order to show that, i tried enabling the
> log_statement option in PostgreSQL.conf. But it shows only the physical
> reads. What i wanted was a Logical reads count( No. of ReadBuffer calls,
> which is stored in ReadBufferCount variable). So i have added this stats to
> the bufmgr.c(function is BufferUsage, i suppose) to show Logical Reads and
> Physical Reads. Is this a acceptable change?

I'm not sure if the number of logical reads is really a useful
measurement. I can imagine there are places that deliberatly read the
block "logically" a few times but drop the pin in between to allow
others access. This will skew your results as in actual usage only the
first is likely to generate a real I/O.

If your problem is cache it seems to me you should test with a table
larger than your shared buffers and perhaps even larger than your total
memory, since this is the case we're actually interested in.

Have a ncie 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 Rainer Bauer 2007-10-20 11:22:56 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous Message Heikki Linnakangas 2007-10-20 08:16:00 Re: Debugger

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2007-10-20 14:14:26 Re: [HACKERS] Why copy_relation_data only use wal whenWALarchivingis enabled
Previous Message Gokulakannan Somasundaram 2007-10-20 03:54:07 Re: Including Snapshot Info with Indexes