Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In the days of SQL Server 2000 and 2005, the maximum number of tables in a query was 256.

Does MySQL have a similar limitation?

I know that such query of such size means that either there's something wrong with database design or some data warehousing solution should be used, but let's forget about this for a while and focus on theoretical capabilities of MySQL.

share|improve this question
2  
Just FYI - that 256 table limit was for SQL Server 2005. It's now limited only by server resources: msdn.microsoft.com/en-us/library/ms143432.aspx –  Brent Ozar Aug 2 at 18:28
    
@BrentOzar That's a very old question, possibly one of those posted during the beta period to seed DBA.SE with content. Anyway, thanks for pointing out the issue! I edited the question to make it more precise. –  Marek Grzenkowicz Aug 2 at 18:53

1 Answer 1

up vote 8 down vote accepted

Limitations of Joins

In MySQL (4.0, 5.0, 5.5), the maximum number of tables that can be referenced in a single join is 61. This also applies to the number of tables that can be referenced in the definition of a view.

share|improve this answer
    
thanks for posting! I had 68 joins. No wonder why my query didn't work. LOL! –  MacGyver May 31 '12 at 5:32
    
JK :-) ... HAHA –  MacGyver May 31 '12 at 5:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.