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 06:17AM

Sir,

If i change the db to innodb engine, can i get any improvement in performance?
I am thinking to move the site to new server leaving mysql server in my current server. Is that a good idea?

SELECT * FROM question.*, user_question_answer.*, 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

This is the select part, and then i do inner join of user_question_answer with these conditions 'questions.id = user_question_answer.user_question_id' another inner join with choices table 'questions.id = choices.question_id'

Where condition is
'user_id' = some id and quiz id = some id
Group by 'questions.id, user_question_answer.id'
Question id is used in user_question_answer and choices tables.

I am not able to get the complete query from this framework. But this is one of the query which uses more joins.

Will i get any performance improvement if i use single table which can hold all the questions, choices, results in json format?

Thanks for helping

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 06:17AM


Sorry, you can't reply to this topic. It has been closed.

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.