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

Re: Blocks read for index scans

From: "Jim Nasby" <jnasby(at)pervasive(dot)com>
To: "Steve Poe" <steve(dot)poe(at)gmail(dot)com>
Cc: "Pgsql-Performance \(E-mail\)" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Blocks read for index scans
Date: 2006-04-13 18:48:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Adding -performance back in...

> From: Steve Poe [mailto:steve(dot)poe(at)gmail(dot)com]
> Jim,
> I could be way off, but doesn't from pg_statio_user_tables 
> contain this
> information? states:

"numbers of disk blocks read and buffer hits in all indexes of that table"

That leads me to believe that it's only tracking index blocks read, and not heap blocks read. One could presume that each index row read as reported by pg_stat_all_tables would represent a heap block read, but a large number of those would (hopefully) have already been in shared_buffers.

> On Thu, 2006-04-13 at 13:00 -0500, Jim Nasby wrote:
> > While working on determining a good stripe size for a database, I  
> > realized it would be handy to know what the average request 
> size is.  
> > Getting this info is a simple matter of joining pg_stat_all_tables  
> > and pg_statio_all_tables and doing some math, but there's 
> one issue  
> > I've found; it appears that there's no information on how 
> many heap  
> > blocks were read in by an index scan. Is there any way to 
> get that info?
Jim C. Nasby, Sr. Engineering Consultant      jnasby(at)pervasive(dot)com
Pervasive Software    work: 512-231-6117
vcard:       cell: 512-569-9461

pgsql-performance by date

Next:From: Francisco ReyesDate: 2006-04-13 18:59:23
Subject: Re: Inserts optimization?
Previous:From: Francisco ReyesDate: 2006-04-13 18:45:39
Subject: Re: Inserts optimization?

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