新网创想网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
SELECT COUNT(1) AS count
创新互联技术团队十余年来致力于为客户提供成都网站建设、成都网站制作、品牌网站制作、全网整合营销推广、搜索引擎SEO优化等服务。经过多年发展,公司拥有经验丰富的技术团队,先后服务、推广了近千家网站,包括各类中小企业、企事单位、高校等机构单位。
FROM (
SELECT a.ykf272, a.akb020, a.akb021, a.yka094, a.ake005
, a.yke936, a.ykf282, a.aac003, a.aac001, a.aac002
, a.akc225, a.akc226, a.ykf275, a.ykf281, a.ykf284
, a.ykf283, a.yke453, a.aae011, a.aae036, a.yke923
, a.yke925, a.yab003, b.yka059, b.yka002, b.yke627
, b.yka095, a.yke938, a.yke940, x.ake006
, pkg_common.fun_getAaa103('YKF062', x.ykf062) AS ykf062
, (
SELECT c.aaa103
FROM bm_ykf063 c
WHERE b.ykf063 = c.ykf063
) AS ykf063, b.yka007, x.ykf064
, (
SELECT pkg_common.fun_getAaa103('AKA070', c.aka070)
FROM ka02 c
WHERE b.yka002 = c.yka002
) AS aka070, pkg_common.fun_getAaa103('YKE469', b.yke469) AS yke469, b.aka074
FROM kz37k1 a, ka05 b, (
SELECT akb020, ake005, yka094, ake006, ykf062
, ykf064
FROM (
SELECT x.akb020, x.ake005, x.yka094, x.ake006, x.ykf064
, x.ykf062, DENSE_RANK() OVER (PARTITION BY x.akb020, x.ake005, x.yka094 ORDER BY aae030 DESC) AS r
FROM kb05k1 x
)
WHERE r = 1
) x
WHERE a.yka094 = b.yka094
AND a.akb020 = x.akb020
AND a.ake005 = x.ake005
AND a.yka094 = x.yka094
AND a.akb020 = '855855'
AND a.yab003 = '0001'
AND trunc(a.aae036, 'dd') >= '08-APR-18'
AND trunc(a.aae036, 'dd') <= '10-APR-18')a;
现在我们发现了问题的原因,那么怎么能阻止谓词推入呢?我们去找找outline部分里面对应该行为的hint。
谓词推入是cbo一种优化的行为,但是谓词推入并不总是好的,如果谓词被推入后缩小了结果集,降低了逻辑读,那就是好的,反之就不太好,其实cbo并不是只要有谓词推入的机会就会推入,由于统计信息不准确,倾斜的列上没有直方图,都会导致cbo在计算cost
的时候产生较大偏差,而对于大的业务表,数据变化频繁,也不能总收集统计信息,所以这时候我们就需要去找到合适的hint来协助cbo做出最优的选择。