MySQL Forums
Forum List  »  Newbie

Re: Too many tables; MySQL can only use 61 tables in a join
Posted by: Phillip Ward
Date: April 23, 2014 05:53AM

Quote

I wrote a script which has dynamic mysql query using many joins.
It adds more joins based on date and was fine until last month.
And this is why you shouldn't partition your data into lots [and lots] of tables all with the same structure.
It doesn't gain you anything, you run into system limitations just like this one, and if your tables are properly organised, you should never need to anyway.

I would suggest that two tables should suffice - an "active" table for records that are used on a regular basis and another for "archived" records that are only used occasionally. A regular maintenance job can move records from one table to the other and a View can be used to "merge" them back together, if and when you need to.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Too many tables; MySQL can only use 61 tables in a join
April 23, 2014 05:53AM


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.