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 first published in August 2002

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close