Finding offensive sql from a batch of queries [message #51467] |
Fri, 24 May 2002 00:40 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kiran srirama
Messages: 14 Registered: March 2002
|
Junior Member |
|
|
Hi friends,
I have a .sql file which consists of around
1000 queries. This batch of SQL queries takes 26 hours to run. Now, most of them are correctly running but few of them need to be tuned.
How should I find the offensive SQL with/without actually running the .sql file ?
Thanks
Kiran
|
|
|
Re: Finding offensive sql from a batch of queries [message #51471 is a reply to message #51467] |
Fri, 24 May 2002 02:00 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Vikas Gupta
Messages: 115 Registered: February 2002
|
Senior Member |
|
|
Hello,
You can run explain plan for each and every query, they will not execute but you will know the path and rogue querries..
Else you can also query:
select sql_text, disk_reads, buffer_gets from v$sqlarea
and see for queries with huge disk_reads or buffer_gets
which may be slowing down the performance.
Vikas.
|
|
|