SQL查询在SQL Server中的持续时间是否有限制? [重复]

时间:2022-12-21 03:55:48

Possible Duplicate:
Maximum size for a SQL Server Query? IN clause? Is there a Better Approach

可能重复:SQL Server查询的最大大小? IN子句?有更好的方法吗?

I Googled for a while and can't find whether there's some hard limit on how huge query strings can be in SQL Server. I mean what if I build a 100 million character query - will it run or will the server just drop it as too long?

我用Google搜索了一段时间,无法找到是否对SQL Server中的查询字符串有多大限制。我的意思是,如果我构建一个1亿字符的查询 - 它会运行还是服务器只是将它丢弃太久?

Is there a limit to how long SQL query can be (in terms of characters or tokens or whatever like that) in SQL Server?

在SQL Server中,SQL查询可以有多长时间(以字符或标记或类似的方式)?

1 个解决方案

#1


11  

I never encountered a problem of SQL query being too long in terms of number of characters, but there is a maximum number of tables a query can reference (256) and I hit this limitation a few times.

我从来没有遇到SQL查询在字符数方面太长的问题,但是查询可以引用的表有最大数量(256)并且我达到了这个限制几次。

Have you ever encountered a query that SQL Server could not execute because it referenced too many tables?

您是否遇到过SQL Server无法执行的查询,因为它引用了太多表?

#1


11  

I never encountered a problem of SQL query being too long in terms of number of characters, but there is a maximum number of tables a query can reference (256) and I hit this limitation a few times.

我从来没有遇到SQL查询在字符数方面太长的问题,但是查询可以引用的表有最大数量(256)并且我达到了这个限制几次。

Have you ever encountered a query that SQL Server could not execute because it referenced too many tables?

您是否遇到过SQL Server无法执行的查询,因为它引用了太多表?