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
What is declare cursor?
How do you stop a db2 database in linux?
What does db2 blu stand for?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?
What is schema in db2?
What is the role of union all and union
What is the syntax for seeing the columns and data types of a table in the db2 database?
How can the duplicate values be eliminated from db2 select?
How is deadlock resolved?
Mention the length of physical storage of the given data types of db2 – date, timestamp, time
Define predicate?
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
Can one database have multiple instances?
How is a typical db2 batch pgm executed?
What is db2 look?