To Andy...
J. Laurindo Chiappa, May 08, 2017 - 7:03 pm UTC
Hi, Andy : Maria is 100% correct, by default the RDBMS does not register/mantain a full list of blocks read : see, if it read (say) one million blocks this is just a number, this result can be registered in a few bytes - no warm to Performance, no worries about space... In the other side, if a full list (not a quantity/sum) of I/Os would be mainteined in this same scenery, potentially it could demand an array of 1 million of elements, or a file with one million of rows, or a table wth 1 million of lines... Not a lighweight thing, for sure, so not done by default ...
If you Really, Positively, Absolutely want this information, yes it would be possible : for example, you can activate a TRACE for this SQL... With an active trace in place YES, every and each I/O (together with many other informations) will be logged in a trace file, later you could read this trace file and parse it for distinct block I/Os, Physical and Logical I/Os, timings or anything... If you do not know how to do SQL TRACEs, search here in asktom for it....
OF COURSE, no free lunch here : you WILL pay for it in the form of some overhead and (maybe a lot of) disk space usage, AND these PARSE operation would be done by hand, mostly ...
Regards,
J. Laurindo Chiappa
Andy Haack, May 23, 2017 - 7:50 am UTC
Hi Maria,
many thanks for the clarification. The background of the question was to predict the effect of tuning specific inefficient SQLs (e.g. unnecessarily doing large index scans) on buffer cache usage.
It's not possible to quantify it in that such detail apparently.
Thanks and regards,
Andy