I am getting following statistics after setting the autotrace on for a query.
Statistics 0 recursive calls 0 db block gets 4 consistent gets 0 physical reads 0 redo size 866 bytes sent via SQL*Net to client 503 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 3 rows processedQusetion: From where is it getting information like 'consistent gets', 'physical reads', 'recursive calls '? Or is it calculated from views like v$sysstat, etc.?
I've never seen the code that SQL*Plus uses when you turn autotracing on. My guess is that SQL*Plus is querying from V$SESSTAT. I arrive at this guess since before you can set autotrace on, you must first run the $ORACLE_HOME/sqlplus/admin/plustrce.sql script. And this script grants SELECT privs on this view.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.