Re: Needs Suggestion

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: SUBHAM ROY <subham(dot)iem(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Needs Suggestion
Date: 2011-04-27 17:55:14
Message-ID: BANLkTi=cU6i3da=pEdTUKBQySdE9n6_drw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 27, 2011 at 16:35, SUBHAM ROY <subham(dot)iem(at)gmail(dot)com> wrote:
> Can I calculate the Buffer Hit ratio of a particular query in postgres? That
> is how many times it finds the required page in its buffer cache,
> pg_buffercache or the
> linux buffer cache.

You can get the information from the pg cache using
EXPLAIN (ANALYZE, BUFFERS) <your query>

It won't get you the stats from the linux filesystem cache though. You
can perhaps use pgfincore for that in some way.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-04-27 18:09:35 Re: Partial Index [WHERE col IN ('A','B')] Planner Anomalies
Previous Message Andy Colson 2011-04-27 17:44:58 Re: Index not being used for UPDATE?