Tuesday, July 9, 2013

How to get explain plan

Below qry will give you explain plan for a qry:
Make sure the "Org_SL" file has qry and has semi colon at the end.

db2expln -d DBNAME -f Org_SL -z \; -t -g -o Org_SL.out

Below qry will give you explain plan for a procedure.
db2expln -d DBNAME -package P6472415 -schema SCHEMANAME -g -o PROC.out

No comments:

Post a Comment