X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 910D611F6003 for ; Thu, 13 Apr 2006 21:36:19 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.418 X-Spam-Level: X-Spam-Status: No, score=-2.418 required=5 tests=[AWL=0.183, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id 62GuL4S9gOqN for ; Thu, 13 Apr 2006 21:36:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 88C5D11F60BF for ; Thu, 13 Apr 2006 21:36:11 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3E0aA4i002790; Thu, 13 Apr 2006 20:36:10 -0400 (EDT) To: Jim Nasby cc: Postgresql Performance Subject: Re: Blocks read for index scans In-reply-to: <85979594-1CCA-43C5-A8F2-08685CF41ACE@pervasive.com> References: <85979594-1CCA-43C5-A8F2-08685CF41ACE@pervasive.com> Comments: In-reply-to Jim Nasby message dated "Thu, 13 Apr 2006 13:00:07 -0500" Date: Thu, 13 Apr 2006 20:36:09 -0400 Message-ID: <2789.1144974969@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/318 X-Sequence-Number: 18402 Jim Nasby writes: > 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? If the table is otherwise idle, the change in the table's entry in pgstatio_all_tables should do, no? (This is as of 8.1 ... older versions acted a bit differently IIRC.) regards, tom lane