
Chapter 6. Custom Database Monitor Analysis 185
SELECT qqstim as "Start timestamp" ,qqetim as "End timestamp",
DECIMAL((DAY(qqetim-qqstim)*24*3600)+
(HOUR(qqetim-qqstim)*3600)+(MINUTE(qqetim-qqstim)*60)+
(SECOND(qqetim-qqstim))+(MICROSECOND(qqetim-qqstim)*.000001),18,3) AS "Temp.
population time" ,qqrcod as "Reason" ,qqtmpr as "Rows in temp" ,qqsttx as "SQL
text"
FROM xx a LEFT JOIN yy b ON a.qqjfld = b.qqjfld AND a.qqucnt = b.qqucnt
ORDER BY "Temp. population time" DESC;
Figure 6-6 shows the result of the query in Example 6-5. The information from the 3004
record is joined with information from the 1000 record so we know which queries were ...