SQL (Structured Query Language) Question:

Download Job Interview Questions and Answers PDF

What is explain plan and how is it used?

SQL Interview Question
SQL Interview Question

Answer:

The EXPLAIN PLAN command is a tool to tune SQL statements. To use it you must have an explain_table generated in the user you are running the explain plan for. This is created using the utlxplan.sql script. Once the explain plan table exists you run the explain plan command giving as its argument the SQL statement to be explained. The explain_plan table is then queried to see the execution plan of the statement. Explain plans can also be run using tkprof.

Download SQL Interview Questions And Answers PDF

Previous QuestionNext Question
What is tkprof and how is it used?How do you set the number of lines on a page of output? The width?