MySQL Is there a limit to InnerJoin?

后端 未结 4 1471
孤街浪徒
孤街浪徒 2021-01-19 00:26

I have this query for gathering the information about a single order and its become quite complex.

I don\'t have any data to test with so i\'m asking, if anyone has

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-19 00:36

    Well I once tried it myself to see the limit for the number of joins and I tested a join with 100 tables on mysql 5.0.4 if I recall it correctly.

    I was given the following error:

    Too many tables. MySQL can only use 61 tables in a join.

    I think the limit for MySql 4 was 31 tables.

    A word of advice if you plan to use that many tables in a query then it's time to start thinking about simplifying your query design.

提交回复
热议问题