View previous topic :: View next topic
|
Author |
Message |
sashi
New User
Joined: 14 Sep 2005 Posts: 54 Location: Chennai
|
|
|
|
Hi,
I am running a SQL query in SPUFI.
And I want to know how much time it took to run the query?
Is it possible to know it through SPUFI or do we have any other method to find out the execution time of SQL query?
Thanks in Adv
Sashi |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Add:
Code: |
SELECT CURRENT TIMESTAMP FROM SYSIBM.SYSDUMMY1; |
before and after your select statement (";" is the default separator).
Then you will have to calculate the difference between the 2 timestamps. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Sashi,
If you want more accurate infomation, you have to setup PLAN tables, mainly DSN_STATEMNT_TABLE, it gives you information regarding processor costs and stuff like that.
Refer the Performance Monitoring & Tuning Guide for DB2.
Thank You,
Sushanth |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Also, the difference in timestamps will give you elapsed time. CPU time will have to be obtained in a different manner. Running SPUFI online via DB2I on your ISPF panel will give you a relative cost, but the number shown there is only a relative number, not CPU seconds or dollars. |
|
Back to top |
|
|
|