GeekInterview.com
Series: Subject: Topic:
Question: 5 of 89

SQL queries performance issue

You have a batch job which has hundreds of SQL queries in it. Earlier is was finishing in expected time. However, now it is taking twice the time. There is no CPU utilization issue due to other jobs. How would you know that which of the queries are taking more time now and why?
Asked by: VNeha | Member Since May-2010 | Asked on: Apr 11th, 2012

View all questions by VNeha

Showing Answers 1 - 2 of 2 Answers
koushikinath

Answered On : May 24th, 2012

View all answers by koushikinath

1. At first enable the trace, at the beginning of the sqls.
2. Then check the trace file.
3. Using tkprof create the output file.
4. According to explain plan check the elapsed time for each query.
5. Then tune them

  
Login to rate this answer.
Nagaraj Teli

Answered On : Jul 22nd, 2012

Please find the below methods for finding one of the query which is taking longer time in the batch script.

Methods :-
1) Put the dbms_output after each of the SQL query.
2) Create a logfile using the tkprof utility.
3) Best Method is take the AWR(Automatic Workload Repository) report from the database and find the particular query which is taking longer time to execute.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Question Categories

Oracle Backup and Recovery Interview Questions

Oracle Basics Interview Questions

Oracle Architecture Interview Questions

D2K Interview Questions

Data Access Interview Questions

Oracle DBA Interview Questions

Oracle security Interview Questions

Database Tuning Questions

Oracle Distributed Processing Interview Questions

Oracle Concepts Interview Questions

Oracle Memory Management Interview Questions

Oracle Forms Interview Questions

PL/SQL Interview Questions

Programmatic Constructs Interview Questions

RMAN Interview Questions

Real time Oracle Interview Questions

Oracle SQL Interview Questions

SQL*Plus interview Questions

Oracle System Architecture Interview Questions

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.