Hi,<br /> I already made a discussion about it. We can view the Logical I/Os. If we enable the log_statement_stats
inthe conf file and apply the following patch, it is possible. But putting it in Explain analyze makes more sense to
me.<br /><br /><br /><br />*** postgresql-8.3beta1/src/backend/storage/buffer<div class="ArwC7c ckChnd"
id="1fcg">/bufmgr.c Tue Sep 25<br />18:11:48 2007<br />--- postgresql-8.3patch/src/backend/storage/buffer/bufmgr.c
Fri Oct 19 <br />23:18:36 2007<br />***************<br />*** 1470,1477 ****<br /> localhitrate =
(float)LocalBufferHitCount *100.0 / ReadLocalBufferCount;<br /><br /> appendStringInfo(&str,<br />!
"!\tSharedblocks: %10ld read, %10ld written, buffer hit rate = %.2f%%\n", <br />!
ReadBufferCount- BufferHitCount, BufferFlushCount, hitrate);<br /> appendStringInfo(&str,<br />
"!\tLocal blocks: %10ld read, %10ld written, buffer hit rate = %.2f%%\n", <br />
ReadLocalBufferCount - LocalBufferHitCount,<br />LocalBufferFlushCount, localhitrate);<br />--- 1470,1477 ----<br />
localhitrate = (float) LocalBufferHitCount *100.0 / ReadLocalBufferCount; <br /><br />
appendStringInfo(&str,<br/>! "!\tShared blocks: %10ld Logical Reads, %10ld Physical Reads, %10ld<br
/>written,buffer hit rate = %.2f%%\n",<br />! ReadBufferCount, ReadBufferCount -
BufferHitCount,<br />BufferFlushCount, hitrate);<br /> appendStringInfo(&str,<br /> "!\tLocal
blocks:%10ld read, %10ld written, buffer hit rate = %.2f%%\n",<br />
ReadLocalBufferCount- LocalBufferHitCount, <br />LocalBufferFlushCount, localhitrate);<br /><br /><br /><br /></div><br
clear="all"/><br />-- <br />Thanks,<br />Gokul.<br />CertoSQL Project,<br />Allied Solution Group.<br />(<a
href="http://www.alliedgroups.com">www.alliedgroups.com</a>)