How do you do the EXPLAIN of a dynamic SQL statement?
Answers were Sorted based on User's Feedback
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 |
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 |
how can you access index
What is view db2?
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?
How do you find the maximum value in a column in db2?
What is deadlock?
Is Cursor exicutable ?
How does DB2 use multiple table indexes?
What is difference between *omit and *nopass?
what is datacom db?
How to execute stored procedures?
How do I start db2 in windows?
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)