We service about 25K of each particular query type per hour per server. QTime *averages* less than a second; however, there always a few (1-10) whose QTimes go way above (10 - 500 seconds) the average. If I harvest these queries from the log an re-execute them they of course execute sub-second. Why are some of these queries running long?
My first thought was perhaps these queries were occurring subsequent to replication commits, which happen every 10 minutes; however, there seem to be no clustering of these events around a 10 minute periodic cycle. (Given that I have not established any appropriate warming queries, this seemed a logical conclusion). My next though was to compare the times that these queries executed versus what I see in the log file (grep SEVERE...) But I found nothing to correlate. Do you folks have any ideas?