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
How to test SQL -911 error while developing COB-DB2 program
How to check table size in db2 sap?
How to retrieve rows from a db2 table in embedded sql?
What do you mean by storage group (stogroup)?
What is db2 purescale?
in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?
What is universal database?
What is netezza database?
Before you give the explain statement, what are the prerogatives?
Can we update view in db2?
What is a db2 schema?
How can deadlocks be resolved?
What is the syntax for FETCH in DB2 ?
How to execute stored procedures?
What is coalesce in db2?