1. Top 10 DB2 SupportTop 10 DB2 SupportTop 10 DB2 SupportTop 10 DB2 Support
Nightmares & How toNightmares & How toNightmares & How toNightmares & How to
Avoid ThemAvoid ThemAvoid ThemAvoid Them
#2#2#2#2
2. Part 2 – Are your tools up to the job?
Image of a junior DBA
Long elapsed times for BI queries (over 30 mins!)
were causing one of our customers some serious
headaches
4. So Triton stepped in…..
We used one of our favourite analysis tools:
Brother Eagle®
From DBI Software
5. …and we discovered
A
B
C
1
2
3
4
A 1
A 2
A 3
A 4
B 1
B 2
B 3
B 4
C 1
C 2
C 3
C 4
Join
A VERY high query execution cost
SQL being generated by the BI tool was captured and found to be a Cartesian join of
two tables
Each with more than 25M rows!
New indexes were not being used
6. The Solution
We reworked the BI report definitions to add missing
database relationships
The BI tool then generated correct JOIN predicates
The reports were re-run to successful completion in
under 2 minutes!
7. The Moral of the Story
Many applications (such as BI, ERP and Java
frameworks) are generating their own SQL – it can be
difficult to know exactly what’s getting thrown at
DB2.
Correct tooling (and the skills to interpret them!) is
essential.