Home » RDBMS Server » Server Administration » Finding offensive sql from a batch of queries
Finding offensive sql from a batch of queries [message #51467] Fri, 24 May 2002 00:40 Go to next message
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
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.
Previous Topic: row size
Next Topic: add datafile to shared drive???
Goto Forum:
  


Current Time: Mon Sep 16 18:13:02 CDT 2024