Statspack [message #303855] |
Mon, 03 March 2008 00:50 |
sairajesh
Messages: 7 Registered: April 2007
|
Junior Member |
|
|
Does StatsPack provide SQL timestamps (The time when the SQL was executed)
|
|
|
|
|
Re: Statspack [message #305060 is a reply to message #303872] |
Fri, 07 March 2008 21:52 |
trantuananh24hg
Messages: 744 Registered: January 2007 Location: Ha Noi, Viet Nam
|
Senior Member |
|
|
Michel, is that right? Pls correct me if I am wrong
SQL> set timing on
SQL> create table test as select * from all_objects
2 where object_id=100;
Table created.
Elapsed: 00:00:01.37 <<--
SQL> select * from test;
OWNER OBJECT_NAME
------------------------------ ------------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------- -------------------
CREATED LAST_DDL_ TIMESTAMP STATUS T G S
--------- --------- ------------------- ------- - - -
SYS I_TYPED_VIEW1
100 100 INDEX
31-JAN-08 31-JAN-08 2008-01-31:17:18:24 VALID N N N
Elapsed: 00:00:00.09 <<--
SQL>
Thank you!
|
|
|
|
|
|
|
Re: Statspack [message #305216 is a reply to message #303855] |
Mon, 10 March 2008 03:17 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Quote: | What does this mean? Which time are you talinkg about?
|
The difference between the time user hit enter and oracle retrieves the row.
Isn't that difference is the time of query execution?
|
|
|
|
Re: Statspack [message #305235 is a reply to message #305218] |
Mon, 10 March 2008 03:51 |
trantuananh24hg
Messages: 744 Registered: January 2007 Location: Ha Noi, Viet Nam
|
Senior Member |
|
|
Quote: |
The time when the SQL was executed
|
Correct me if I am wrong to understand this statement
The time when the SQL was executed are not same in twice time. If it was parsed by first time, this is hard parse, for the second, this is soft parse. Of course, the second time is always faster than one.
Can we get the time when one statement was executed by ELAPSED_TIME colum in v$sql?
SQL>select sql_id, elapsed_time from v$sql
where sql_id like '5%'
/
SQL_ID ELAPSED_TIME
------------- ------------
5j35wpppf003m 6386
5rh0tbv3d80bh 574401
5f4fxcnw8h15g 17190
5rgfh8a8bc1n1 28775
5mpk55t8bw1y7 487774
5apa5r99y027p 593894
5dgt7zg1bc2ur 7769
Thank you!
[Updated on: Mon, 10 March 2008 03:53] Report message to a moderator
|
|
|
Re: Statspack [message #305525 is a reply to message #305235] |
Tue, 11 March 2008 03:28 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
I think we're having some language problems here.
The phrase 'The time when the SQL was executed' would naturally refer to the time shown on a clock at which the SQL statement was sent to the database for execution.
Several people seem to be using this phrase to mean 'The time the Sql took to execute'
|
|
|