Hi,
This Task is an analysis of a SQL trace of kmail2 fetching 1599 email messages.
The graphs show that the aggregate SQL processed exceeds over 8,000+ per second. I did not capture top data while kmail2 was downloading the messages but I recall seeing mysqld consuming nearly an entire processor. This makes sense given the rate of SQL being submitted.
Attached is also a tar-ball with the SQL trace split into different files by thread_id. For convenience, the files are tab-delimited.
Our goal should be to minimize the amount of chatter between the client and the (DB) server. Ideally, if we could either batch and/or push some of the logic into one or more Stored Procedures, that would be ideal. Using SP's would mean we would not have to call Prepare's (more on this in a subsequent post to this thread).
The next step for me is to strip out search-arguments in the predicate to see if we I can see any patterns from which we can figure out one or more SP's.