Q

Where is autotrace getting stats?

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 processed
Qusetion: 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


This was last published in August 2002

Dig Deeper on Oracle database design and architecture

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close