Wednesday, May 20, 2009
How to find TOP SQL in a particular period.
SELECT SQL_TEXT,X.CPU_TIME FROM DBA_HIST_SQLTEXT DHST, (SELECT DHSS.SQL_ID SQL_ID,SUM(DHSS.CPU_TIME_DELTA) CPU_TIMEFROM DBA_HIST_SQLSTAT DHSSWHERE DHSS.SNAP_ID IN(SELECT SNAP_ID FROM DBA_HIST_SNAPSHOTWHERE BEGIN_INTERVAL_TIME>=TO_DATE('09/08/2008','MM/DD/YYYY')AND END_INTERVAL_TIME<=TO_DATE('09/09/2008','MM/DD/YYYY'))GROUP BY DHSS.SQL_ID) X WHERE X.SQL_ID=DHST.SQL_ID ORDER BY X.CPU_TIME DESC;
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(30)
-
▼
May
(13)
- To find total size of the database
- The simplest query for checking what’s happening i...
- Starting Up with a Non-Default Server Parameter File
- How to backup the archivelogs which are not backed...
- Migrating to Automatic Undo Management
- Create Schema stmt
- Disabling the Recyclebin at session level and syst...
- how to know whether 32-bit or 64-bit oracle s/w in...
- max_enabled_roles error in all the versions includ...
- How to find TOP SQL in a particular period.
- How to do database characterset migration
- Using metadata
- Finding 64-bit or 32-bit at OS level
-
▼
May
(13)
About Me
- Palani Vijay
- Working as Oracle DBA for Wipro Technologies, Chennai, India
No comments:
Post a Comment