What is an EXPLAIN in DB2.
How and what is the steps followed in EXPLAIN command. Can
all the queries be used in EXPLAIN command to check the
performance.

Answer Posted / yuvaevergreen

>>Explain can be used to improve the performance of queries.
>>Explain command populates three tables
PLAN_TABLE,DSN_STATEMNT_TABLE,DSN_FUNCTION_TABLE. These
tables contains various info about the queries which can be
used for improving the performance.
>>Step1:PLAN_TABLE must be created.
>>Step2:Use explain sql or explain option in Bind to
populate the tables.
>>For example,explain plan set queryno=01 for select empname
from employee;
This would populate plan and statement table.Assigned
queryno would be 01.
>>Alternately EXPLAIN(YES) in BIND option.
>>Only select,insert,update,select for update,delete, delete
current of cursor,update current of cursor can be used in
explain.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of db2?

587


What is the syntax for FETCH in DB2 ?

675


What is the latest version of ibm db2?

740


How do I optimize a query in db2?

624


How to access db2 tables in mainframe?

615






Why db2 is called db2?

595


Define db2.

672


Explain the function done by data manager?

857


What is dbrm library?

578


Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.

2324


How connect db2 database to datastage?

765


What language is db2 written in?

595


Is schema the same as database?

631


How many databases are there?

592


What is meant by dclgen?

618