Re: Needs Suggestion

From: Andy Colson <andy(at)squeakycode(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:40:08
Message-ID: 4DB854F8.7050303@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/27/2011 9:35 AM, SUBHAM ROY 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.
>
> --
> Thank You,
> Subham Roy,
> CSE IIT Bombay.
>

There are plenty of stats per table, but I dont think you'll find
anything per query.

However, you could clear the table stats, run the query a bunch of
times, then look at the table stats. Also, it'll tell you pg buffer
hits, but you wont really know if it hit the linux cache or actual hard
drive.

Google can help you out with table stats: postgres cache hit

-Andy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-04-27 17:40:18 Re: Index not being used for UPDATE?
Previous Message Tom Lane 2011-04-27 17:36:25 Re: timestamp(0) vs. timestamp