Personal tools
You are here: Home Forums DB2 db2explain and runstat
Navigation
Log in


Forgot your password?
 
Document Actions

db2explain and runstat

Up to DB2

db2explain and runstat

Posted by abcd at December 09. 2008

Hi i need db2explain syntax .explain should work only on single table??




and is there any script to execute accessplan for few tables at a time? is this correct way?




i need runstate cmd to run at a time for few tables.




Regards


kanak


Re: db2explain and runstat

Posted by perallis at May 11. 2009

Example, for table staff and for query "select * from staff where id=10"

Before you run the db2expln, you have to enable the explain tables, see the commands below:


cd <instance directory>/sqllib/misc

db2 -tvf EXPLAIN.DDL

 


db2expln -d sample -g -q "select * from staff where id" -t


The option -t means: Terminal Output, if you use the option -o <fileoutput>, your results will be saved in a file
and the option -g means: graphic  output.


 


 


Powered by Ploneboard
Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls