星期四, 12月 02, 2010

How to find out indexes created or used during the execution of an SQL statement


Two methods as following:

1. Visual Explain tool, through iSeries Navigator.

2. - chgjob (4 0) *seclvl logclpgm(*yes)
- strdbg
- run your sql statement from interactive sql400
- quit sql400
- enddbg
and watch the joblog to see which indexes where used/built.