1
如何“提示”递归CTE的基数?
我使用以下递归CTE作为最小示例,但总的来说,优化程序必须对递归CTE使用默认的“猜测”基数: with recursive w(n) as ( select 1 union all select n+1 from w where n<5 ) select * from w; /* n --- 1 2 3 4 5 */ explain analyze with recursive w(n) as ( select 1 union all select n+1 from w where n<5 ) select * …