Distinguising one SQL execution from another

  • From: Smiley John - IL <SMILEYJ@xxxxxxxx>
  • To: "Oracle-L@Freelists. Org (E-mail)" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 12 Oct 2004 09:04:35 -0500

Is there a way to distinguish one execution of a SQL statement by a given
session from another?  Say I look at v$session and see that the session is
active and I record the sql_hash_value and sql_address.  Then at some later
time I examine v$session again and find that the same session is active and
that the sql_hash_value and sql_address are the same as recorded earlier.
Is there any way to tell if the session is executing on the same call or if
they are two different executions of the same SQL?  How might I determine
how many times the same SQL was executed by the session between peeks at
v$session?  Better yet, how might I determine how much time was spent during
each execution.  Assume that this is 8i or 9i.  
 
10g gives this information at the SQL statement level in v$sql, but there is
still no information about how long a particular session spent parsing,
executing, and fetching for a given statement (that I know of).
 
John Smiley
 
 
 

--
//www.freelists.org/webpage/oracle-l

Other related posts: