我正在使用带有codeigniter
框架的mysql数据库
在那个连接中,一次超过5个表。 MySql查询很好,它可以正确生成结果,但是生成大约9-12 sec
的结果需要花费太多时间。
如何增加查询的执行时间。
SELECT `questions`.* FROM `questions` LEFT JOIN `universities_questions` ON `questions`.`id` = `universities_questions`.`question_id` LEFT JOIN `courses_questions` ON `questions`.`id` = `courses_questions`.`question_id` LEFT JOIN `branches_questions` ON `questions`.`id` = `branches_questions`.`question_id` LEFT JOIN `subjects_questions` ON `questions`.`id` = `subjects_questions`.`question_id` LEFT JOIN `question_types_questions` ON `questions`.`id` = `question_types_questions`.`question_id` LEFT JOIN `questions_year` ON `questions`.`id` = `questions_year`.`question_id` WHERE `questions`.`status` = '1' GROUP BY `questions`.`id` ORDER BY `questions`.`id` DESC LIMIT 1
答案 0 :(得分:0)