sql-server-2008 - SQL Server 2008 中允许的最大联接数是多少?

标签 sql-server-2008 join

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/

相关文章:

sql - 在 SQL Server 2008 中区分两个表模式的最简单方法?

mysql - JOIN 显示行,即使它为空

mysql - SQL - 使用 Union All 和 Join 进行计算

sql - 尝试使用带有SUM函数的INNER JOIN和GROUP BY SQL,不起作用

sql - 如何检查一组行是否覆盖整个时间范围

sql - 将超过 1000 行从 Excel 插入 SQL Server

asp.net-mvc-3 - mvc3小数四舍五入2位

c# - LINQ GroupBy 抛出错误

mysql 按日期排序并对父表进行排序

sql - 如何解决 SQL Server 错误 "An expression of non-boolean type specified in a context where a condition is expected, near ' GROUP'"