In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
ALTER TABLE `log` ADD INDEX `log_idx_creationtime` (`creationtime`);
ALTER TABLE `wsc_logrecords` ADD INDEX `wsc_logrecords_idx_message` (`message`);
SELECT
logid4_1_ AS logid4_1_,
loglevel4_1_ AS loglevel4_1_,
creation3_4_1_ AS creation3_4_1_,
service17_4_1_ AS service17_4_1_,
logtype4_1_ AS logtype4_1_,
logrecord1_.logrecordid AS logrecor1_3_0_,
logrecord1_.timestamp AS timestamp3_0_,
logrecord1_.message AS message3_0_,
logrecord1_.loglevel AS loglevel3_0_,
logrecord1_.logid AS logid3_0_,
logrecord1_.indexcolumn AS indexcol6_3_0_
FROM
(SELECT
this_.logid AS logid4_1_,
this_.loglevel AS loglevel4_1_,
this_.creationtime AS creation3_4_1_,
this_.serviceInitiatorID AS service17_4_1_,
this_.logtype AS logtype4_1_
FROM
log this_
ORDER BY
this_.creationtime DESC LIMIT 25) this_
INNER JOIN
wsc_logrecords logrecord1_
ON this_.logid4_1_ = logrecord1_.logid
WHERE
(
1 = 1
)
AND (
1 = 1
)
AND logrecord1_.message = 'SecondMessage' LIMIT 25