MySQL Forums
Forum List  »  Newbie

Re: MySQL is eating all the CPU 100% - Guide me to fix this please
Posted by: Mahesh Kumar
Date: October 23, 2017 10:30AM

EXPLAIN SELECT questions.id, questions.question_direct, questions.question_user, questions.quiz_id, GROUP_CONCAT(choices.id) as choice_id_array, GROUP_CONCAT(choices.choice) as choice_array, GROUP_CONCAT(choices.points) as points_array, GROUP_CONCAT(choices.result_id) as result_array FROM questions INNER JOIN questions.id = choices.question_id WHERE quiz_id = 1 GROUP BY questions.id ORDER BY RAND()

I tried to convert the query in sql format.

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.question_id WHERE quiz_id = 1 GROUP BY questions.id ORDER BY RAND()' at line 1

But i get the following error. But this query is properly converted by php framework and works good in server.

Options: ReplyQuote


Subject
Written By
Posted
November 07, 2017 09:51AM
Re: MySQL is eating all the CPU 100% - Guide me to fix this please
October 23, 2017 10:30AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.