8623错误:The query processor ran out of internal resources and could not pro
8623错误:The query processor ran out of internal resources and could not produce a query plan 问题描述: 配置了SQL Server安全性16的告警,发送邮件通知,如下: 收到如下告警信息: 查看错误日志: Error: 8623, Severity: 16, State: 1. The query processor ran out of internal resources and could not produce a query plan. 原因: 这是一个突发事件,预料中只会发生在极其复杂的查询,或者参照了非常大量的表或者分区的查询。比如,使用IN从句(多于10000个条目)SELECT记录。 解决方法: 如果是SQL Server 2008 R2及之前版本,使用Server Side Trace;如果是SQL Server 2012及之后版本,使用Extended Event。首先,跟踪到具体导致8623错误的查询。然后对查询进行优化,可以尝试将部分查询结果放到临时表中,然后再...