Top Banner
Debugging/Tuning Queries Debugging/Tuning Queries via iSeries Navigator via iSeries Navigator Tom McKinley Tom McKinley [email protected] [email protected]
19
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Debugging/Tuning Queries via Debugging/Tuning Queries via iSeries NavigatoriSeries Navigator

Tom McKinleyTom [email protected]@us.ibm.com

Page 2: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Tour Tour

What’s info is available What’s info is available – System MonitoringSystem Monitoring– Collection ServicesCollection Services– Work Management Work Management – Table Table – Show IndexesShow Indexes

– Index Advisor (DB, Schema or table level) Index Advisor (DB, Schema or table level) BETA BETA ONLY, removed from presentation. ONLY, removed from presentation.

– Stats Stats

Page 3: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

System Level MonitoringSystem Level Monitoring

Page 4: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Example System MonitorExample System Monitor

Page 5: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Open MonitorOpen Monitor

Page 6: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.
Page 7: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Active JobsActive Jobs

Page 8: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Current SQL For A JobCurrent SQL For A Job

Page 9: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Current SQL for a jobCurrent SQL for a job

Page 10: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Explain from Current SQL Explain from Current SQL

Page 11: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.
Page 12: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Index Advised Index Advised

Page 13: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.
Page 14: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Columns Stats on a table Columns Stats on a table

Page 15: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.
Page 16: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Column Stats DetailsColumn Stats Details

Page 17: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Statistics Requests Statistics Requests

Page 18: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Other sources of InfoOther sources of InfoDB2 for iSeries Web Site DB2 for iSeries Web Site – http://www-03.ibm.com/servers/eserver/iseries/db2/http://www-03.ibm.com/servers/eserver/iseries/db2/

Monitor queries Monitor queries – http://www-03.ibm.com/servers/eserver/iseries/db2/dbmonqrys.htmhttp://www-03.ibm.com/servers/eserver/iseries/db2/dbmonqrys.htm

White papersWhite papers– http://www-03.ibm.com/servers/eserver/iseries/db2/awp.htmlhttp://www-03.ibm.com/servers/eserver/iseries/db2/awp.html

SQL performance and query optimization guide (Info Center)SQL performance and query optimization guide (Info Center)Common, Tech Conferences…Common, Tech Conferences…Query Performance tuning workshopQuery Performance tuning workshop– http://www-03.ibm.com/servers/eserver/iseries/service/igs/http://www-03.ibm.com/servers/eserver/iseries/service/igs/

db2performance.htmldb2performance.html

Page 19: Debugging/Tuning Queries via iSeries Navigator Tom McKinley Mac2@us.ibm.com.

Summary Summary

Many things affect query plansMany things affect query plansTry to understand the access methodsTry to understand the access methodsLearn the tools Learn the tools Size mattersSize matters– ““Bad Performance does not scale”.Bad Performance does not scale”.

You need to collect info before you make You need to collect info before you make changes to help understand what changed and changes to help understand what changed and the impact of that change.the impact of that change.Don’t only focus on Runtime. Look for resource Don’t only focus on Runtime. Look for resource hogs, or for queries that are run frequentlyhogs, or for queries that are run frequentlyGood indexing strategy in some cases is criticalGood indexing strategy in some cases is critical