SQL Server error code
SQL Server error 8621
SQL Server raises error 8621 at severity 16, which marks a problem with the query or data that you can correct.
The query processor ran out of stack space during query optimization. Please simplify the query.
| Msg | 8621 |
|---|---|
| Name | OPTIMIZER_STACK_OVERFLOW_ERR |
| Severity | 16 |
| Group | 8000–8999 |
What it means
The size of the expanded query is the most likely cause of the error. The expanded query substitutes into the original query the definitions of each of the views, computed columns, Transact-SQL functions, and common table expressions it references, as well as cascading actions like updating secondary indexes, views, and triggers.