MySQL Forums
Forum List  »  Newbie

Re: Too many tables; MySQL can only use 61 tables in a join
Posted by: Rick James
Date: April 23, 2014 11:05AM

> A regular maintenance job can move records from one table to the other

Depending on what triggers the move, PARTITIONing may be a solution which need little or no action on your part.

> tables all with the same structure.

Hmmm... Don't you want UNION?

Sometimes (not always), this pattern can get rid of a JOIN:

SELECT ...,
( SELECT foo FROM tbl1 ... ) AS foo,
( SELECT bar FROM tbl2 ... ) AS bar,
...
FROM ...

The subqueries are likely to be 'correlated' subqueries, which (I think) would not count toward the 61. They would replace the need for JOINing to tbl1 and tbl2. (Yeah, that gets messy and inefficient if you need more than one field from tbl1.)

Phillip and I are guessing at what would help. If you want more specific advice, let's see your query and the SHOW CREATE TABLE for the table(s).

Options: ReplyQuote


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


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.