cte_max_recursion_depth¶
cte_max_recursion_depth控制递归 CTE 可以执行的迭代次数。
描述¶
这是同时具有 GLOBAL 和 SESSION 作用域的动态系统变量。默认值为 1000,有效范围为 0 至 4294967295。递归 CTE 超过会话值时,MatrixOne 会中止查询。使用 cte_max_memory_bytes 限制递归 CTE 批次保留的内存。
语法¶
SET [GLOBAL | SESSION] cte_max_recursion_depth = number_of_iterations
参数说明¶
cte_max_recursion_depth 接受 0 至 4294967295 范围内的整数。该变量可以动态修改;不指定作用域关键字时,默认修改 SESSION 值。
示例¶
SET SESSION cte_max_recursion_depth = 1000;
SELECT @@session.cte_max_recursion_depth;