How do you do the EXPLAIN of a dynamic SQL statement?

Answers were Sorted based on User's Feedback



How do you do the EXPLAIN of a dynamic SQL statement?..

Answer / swetha dasari

we could replace the unknown values with a "?"
eg:

select name

from database

where name = ?

Is This Answer Correct ?    3 Yes 3 No

How do you do the EXPLAIN of a dynamic SQL statement?..

Answer / mehdee

- When we issue an EXPLAIN as of the BIND like EXPLAIN
(YES), then results to analyze the path will go into 3 DB2
tables: PLAN_TABLE, DSN_STATEMENT_TABLE &
DSN_FUNCTION_TABLE. And you can do:
- select * from fhtdev.plan_table; And columns are
defined in DB2 Developers Guide EXPLAIN.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More DB2 Interview Questions

how can you access index

4 Answers   IBM, Tech Mahindra,


What is view db2?

0 Answers  


Shall i use this query to retrieve first 4 records, Select empno, sal from emptbl where empno < 5. like this can we fetch first 100 records?

3 Answers  


How do you find the maximum value in a column in db2?

0 Answers  


What is deadlock?

2 Answers  






Is Cursor exicutable ?

3 Answers   TetraSoft,


How does DB2 use multiple table indexes?

1 Answers  


What is difference between *omit and *nopass?

1 Answers   IBM, TCS,


what is datacom db?

2 Answers   CSC,


How to execute stored procedures?

0 Answers  


How do I start db2 in windows?

0 Answers  


In a Cobol-DB2 program, I am fetching rows from 4 tables using cursor and then based on the a field present in that table, It processes the information accordingly..for example stat-c is one digit field..if stat-c is 'D' then the a row is deleted from table and written those details in to a file. If the stat-c is 'U' then a row is updated (hardcoded what to update)in a table and written those details in to a file. If the stat-c is 'I' then a row is inserted in a table and written those details in to two files. The issue is i have to include the intermediate commits. When an abend occurs, due to commit statement db2 tables will be saved, But there will be lose of file contents. When we resubmitting the job associated with this program there will be insert ,update and delete anomolies to avoid that what measures could be taken?. The intermediate commit is nothing but issuing commit after massive inserts, updates and deletes(sum of 500actions)

2 Answers  


Categories