Re: select with join of 25 tables crashes mysql database
Posted by:
Rick James
Date: October 04, 2012 10:20PM
Hundreds of identical tables? Bad design.
SELECT * will return all the columns from all the tables mentioned. That could be thousands of columns! Sounds like a mistake.
> `id` tinyint(6) NOT NULL auto_increment,
That won't let you have more than 127 rows. Is that deliberate?
> phpMyAdmin stops responding, and the database must be deleted
No. Kill phpMyAdmin and restart MySQL. You should not need to "delete the database".
What you have might work with one of these suggestions:
Plan A:
SET optimizer_search_depth = 2;
Plan B:
STRAIGHT_JOIN
Plan C:
Abandon Moodle.
Subject
Written By
Posted
Re: select with join of 25 tables crashes mysql database
October 04, 2012 10:20PM
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.