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 `table1` ADD INDEX `table1_idx_field4` (`field4`);
ALTER TABLE `table2` ADD INDEX `table2_idx_field3_field1` (`field3`,`field1`);
ALTER TABLE `table3` ADD INDEX `table3_idx_field6_field5` (`field6`,`field5`);
SELECT
*
FROM
table1 a
JOIN
table2 b
ON b.field1 = a.field1
WHERE
b.field3 = 1531
AND a.field4 = 0
AND EXISTS (
SELECT
DISTINCT 1
FROM
table3
WHERE
(
table3.field6 = 172
)
AND (
a.field5 = table3.field5
)
)