SQL Query statists?
sono99Jul 8 2009 — edited Jul 10 2009I'd like to know if there is any easy, and convenient way, for someone to execute an SQL query an calculate, these measurments relative to the query:
1) The I/O performed
2)Number Read I/O
3) Number of Write out I/O
(such that 2+3 = 1
4) Number of buffered reads
5)Query Execution time
6) Query CPU usage
I've heard mention of such statisctis in views such as V$OSSTAT, etc.
But these views give the current values, and not the specific cumulative values. Such as: cummulative CPU usage time since start of the query; cumulative I/O since query begin, etc...
What is the right approach to this. Is it through the V$SESSION view? Would you about it by storing the V$SESSIOn values before the query, you run the query, and get the new V$SESSION values?