GROUP_CONCAT too slow
Hello I added GROUP_CONCAT function to my query and that function killed
my query :/. My query is :
SELECT u.username,a.user_id,a.id,a.text,a.lang as fromLang,b.lang as
toLang,GROUP_CONCAT(DISTINCT b.id) AS translation_ids FROM sentence as a
INNER JOIN sentence_relationship as sr ON
(sr.sentence_id = a.id)
INNER JOIN sentence as b ON
(b.id = sr.translation_id AND a.id = sr.sentence_id)
INNER JOIN users as u ON
(u.id = a.user_id) GROUP BY a.id LIMIT 10;
What is wrong with that query ?
No comments:
Post a Comment