gpt4 book ai didi

php - 为什么在特定表后 Huge Join 失败?

转载 作者:行者123 更新时间:2023-12-01 00:37:13 27 4
gpt4 key购买 nike

我有一个巨大的选择查询,我必须在其中加入超过 85 个表。我在运行查询时不断收到错误消息,如果我在收缩整个语句时重新运行查询,它运行良好。

查看下面的部分连接,它一直执行到表 85:

select $imploded_tables from $apps a 
left join $mobile_c0 $m_c0 on $apps.id = $m_c0.id
left join $mobile_c1 $m_c1 on $m_c0.id = $m_c1.id
left join $mobile_c2 $m_c2 on $m_c1.id = $m_c2.id
left join $mobile_c3 $m_c3 on $m_c2.id = $m_c3.id
left join $mobile_c4 $m_c4 on $m_c3.id = $m_c4.id
left join $mobile_c5 $m_c5 on $m_c4.id = $m_c5.id
left join $mobile_c6 $m_c6 on $m_c5.id = $m_c6.id
left join $mobile_c7 $m_c7 on $m_c6.id = $m_c7.id
left join $mobile_c8 $m_c8 on $m_c7.id = $m_c8.id
left join $mobile_c9 $m_c9 on $m_c8.id = $m_c9.id
left join $mobile_c10 $m_c10 on $m_c9.id = $m_c10.id
...
...

最佳答案

Mysql Documentation

The maximum number of tables that can be referenced in a single join is 61.

关于php - 为什么在特定表后 Huge Join 失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45872712/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com