SQL Server 2008 中允许的最大联接数是多少?
最佳答案
其他答案已经直接回答了您的问题
Limited only by available resources
但是,即使 SQL Server 成功地为您的查询编译了一个计划,这并不意味着您应该这样做。您拥有的连接越多,可能的查询计划的空间就会呈指数级增长,并且您很可能会得到非常次优的计划。
对于具有 12 个连接的查询,可能的连接顺序数为 28,158,588,057,600 .此外,每个连接可能是三种可能的算法(散列、嵌套循环、合并)
在“SQL server 2005 实用故障排除”一书中,Cesar Galindo-Legaria 说
If you are joining over 20 tables, chances are the optimizer is not reviewing the entire search space but relying more on heuristics .... we have seen applications that run regular queries dealing with over 100 tables. While it is possible to run such very large queries, you really are stretching the system in these cases and should be very careful going this far
关于sql-server-2008 - SQL Server 2008 中允许的最大联接数是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2558667/