To build the OMG Ponies answer, a time-based customization is something possible, but not realistic. You will need to start by caching with a full cache in each case or with a completely empty buffer cache, and none of them will represent reality, especially if there is no competing load.
When I tune in, it is usually against a live system with activity, and I focus on setting logical I / O operations either using the extended SQL trace ( dbms_monitor.session_trace_enable / dbms_monitor.session_trace_disable ), either using the tkprof utility or using SQL * Plus and set autotrace traceonly - which does all the query work, but produces an output, because I'm usually not interested in watching a jillion line scroll.
The exact mechanism usually involves related SQL, using something like the following:
variable :my_bind1 number; variable :my_bind2 varchar2(30); begin :my_bind1 := 42; :my_bind2 := 'some meaningful string'; end; / set timing on; set autotrace traceonly; [godawful query with binds] set autotrace off;
As part of the results, I am looking for a plan that I would expect, a comparative value for sorts - provided that it exists - and, most importantly, the number of consecutive I / O operations. How many Oracle blocks had to be read in consistent mode to satisfy the request. I cannot find the source of the quote, but I think it is Cary Milsap from method R.
"Configure logical I / O, and your physical I / O will follow."
source share