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 `completed_tests` ADD INDEX `completed_tests_idx_tests_id_status` (`tests_ID`,`status`);
ALTER TABLE `tests` ADD INDEX `tests_idx_lessons_id_id` (`lessons_ID`,`id`);
SELECT
ct.archive,
ct.status,
ct.score,
ct.users_LOGIN,
t.lessons_ID,
t.content_ID,
t.keep_best
FROM
completed_tests ct,
tests t
WHERE
ct.status != 'deleted'
AND ct.status != 'incomplete'
AND t.id = ct.tests_ID
AND t.lessons_ID = 10