gpt4 book ai didi

sql-server - SQL Server 查询处理器耗尽内部资源

转载 作者:行者123 更新时间:2023-12-02 19:30:13 26 4
gpt4 key购买 nike

查询:

update mytable 
set mycol = null
where id in (
583048,
583049,
... (50000 more)
)

消息:

The query processor ran out of internal resources and could notproduce a query plan. This is a rare event and only expected forextremely complex queries or queries that reference a very largenumber of tables or partitions. Please simplify the query. If youbelieve you have received this message in error, contact CustomerSupport Services for more information.

我的查询很简单,我应该怎么写才能正常工作?

最佳答案

将值列表插入到 #temp 表中,然后对其使用 in

如上所述in this answer大量 IN 值可能会导致其在扩展为 OR

时耗尽堆栈

See also related connect item

关于sql-server - SQL Server 查询处理器耗尽内部资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7804201/

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