So i have a complicated MySQL search query, and I wonder which columns I need to index to speed up searching:
SELECT wpp.ID, post_title, wp_terms.name AS category, wp_terms.slug AS slug, supplier_company,
GROUP_CONCAT(wp_terms.slug SEPARATOR ', ') AS allslug,
GROUP_CONCAT(wp_terms.name SEPARATOR ', ') AS allcatname
FROM wp_posts AS wpp
LEFT JOIN wp_term_relationships ON wpp.ID = object_id
LEFT JOIN wp_terms ON term_taxonomy_id = wp_terms.term_id
LEFT JOIN wp_teleapo_supplier AS s ON wpp.post_author = s.ID
WHERE post_type = 'post'
GROUP BY wpp.ID
1) How to speed up the group_concat?
2) Should I index the column for ON
at my LEFT JOIN
s? Like: wpp.ID
and object_id
?