DB2 Batch
DB2 Batch
DB2 Batch
Where is the
bottleneck in my SQL
DML ?
db2batch can
measure the time
to answer all these
questions!
How long
does my SQL
take ?
Why is it so
slow today?
PERSON
-------------------id
name
lastname
country
email
LIKES
-------------------id1
id2
EXECUTE
FETCH
DB2 creates
the access plan
-o | options
f row fetch
r rows out
p perfil detail
o query
optimization class
-i | format of measured
elapsed times: Complete
Statements example
Find the names of all who are friends with someone named
Gabriel.
Find the names who lives in US
Find all the information about person who has the ID 5239306
Statements example
select name from person where id in (select id2 from person
inner join friend on person.id=friend.id1 where name =
'GABRIEL');
select name from person where id in (select id2 from person inner join
friend on person.id=friend.id1 where name = 'GABRIEL');
db2batch output
Output Graphic
5,0000000000
4,5000000000
4,0000000000
3,5000000000
3,0000000000
PREPARE
EXECUTE
2,5000000000
FETCH
2,0000000000
TOTAL
1,5000000000
1,0000000000
0,5000000000
0,0000000000
SQL1
SQL2
SQL3
SQL4