/+ materialize/ 优化
被调用 1 次,不会放入临时表。 被调用 2 次及以上, CBO 优化器会自动把 with as 短语所获取的数据放入临时表中。
hint 关键字描述
/+ materialize/会强制性要求 with as 中的结果转换为 临时表/+ inline/与上相反,不转换
WITH t_emp
AS(
SELECT e
.empno
, e
.ename
, e
.sal
FROM scott
.emp e
WHERE e
.sal
> (SELECT AVG(e_1
.sal
) FROM scott
.emp e_1
)
)
SELECT * FROM t_emp
;
转载请注明原文地址:https://tech.qufami.com/read-21687.html