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 `attributes_one_match` ADD INDEX `attributes_match_idx_id_items` (`id_items`);
ALTER TABLE `attributes_one_translations` ADD INDEX `attributes_transla_idx_id_one` (`id_attributes_one`);
ALTER TABLE `attributes_two_match` ADD INDEX `attributes_match_idx_id_two` (`id_attributes_two`);
ALTER TABLE `attributes_two_translations` ADD INDEX `attributes_transla_idx_id_code` (`id_language_code`);
ALTER TABLE `languages` ADD INDEX `languages_idx_language_code_id_languages` (`language_code`,`id_languages`);
SELECT
i.id_items AS id,
GROUP_CONCAT(DISTINCT aot.translation
ORDER BY
aot.translation DESC SEPARATOR '!¡') AS attribute_one,
GROUP_CONCAT(DISTINCT att.translation
ORDER BY
att.translation DESC SEPARATOR '!¡') AS attribute_two
FROM
items i
LEFT JOIN
languages AS l
ON l.language_code = 'en'
LEFT JOIN
attributes_one_match AS aom
ON aom.id_items = i.id_items
LEFT JOIN
attributes_one_translations AS aot
ON aot.id_attributes_one = aom.id_attributes_one
AND l.id_languages = aot.id_language_code
AND (
MATCH (attributes_one_translations.translation) AGAINST ('"Gold"' IN BOOLEAN MODE)
OR MATCH (attributes_one_translations.translation) AGAINST ('"Silver"' IN BOOLEAN MODE)
)
LEFT JOIN
attributes_two_match AS atm
ON atm.id_items = i.id_items
LEFT JOIN
attributes_two_translations AS att
ON att.id_attributes_two = atm.id_attributes_two
AND l.id_languages = att.id_language_code
GROUP BY
id
ORDER BY
2 ASC