Skip site navigation (1) Skip section navigation (2)

Re: Buffer usage in EXPLAIN and pg_stat_statements (review)

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Buffer usage in EXPLAIN and pg_stat_statements (review)
Date: 2009-10-01 02:40:27
Message-ID: 20091001112006.9C36.52131E4D@oss.ntt.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
Euler Taveira de Oliveira <euler(at)timbira(dot)com> wrote:

> > But there are some confusions in postgres; ReadBufferCount and
> > BufferHitCount are used for "get" and "hit", but "heap_blks_read"
> > and "heap_blks_hit" are used for "read" and "hit" in pg_statio_all_tables.
> I see. :(

I fixed the confusions of get, hit and read in your patch.
    long	num_hit = ReadBufferCount + ReadLocalBufferCount;
    long	num_read = num_hit - BufferHitCount - LocalBufferHitCount;
should be
    long	num_get = ReadBufferCount + ReadLocalBufferCount;
    long	num_hit = BufferHitCount + LocalBufferHitCount;
    long	num_read = num_get - num_hit;

ReadBufferCount means "number of buffer access" :(

Patch attached.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Attachment: buffer_usage_20091001.patch
Description: application/octet-stream (22.6 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Mark MielkeDate: 2009-10-01 03:09:02
Subject: Re: Use "samehost" by default in pg_hba.conf?
Previous:From: Robert HaasDate: 2009-10-01 02:39:01
Subject: Re: Use "samehost" by default in pg_hba.conf?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group