单独执行很快,可是用union all就很慢了,请问如何优化
1个回答
2016-08-23
展开全部
数据缓冲区命中率是100%
SQL> select a.value + b.value "logical_reads", c.value "phys_reads",
2 round(100 * ((a.value+b.value)-c.value) / (a.value+b.value)) "BUFFER HIT RA
TIO"
3 from v$sysstat a, v$sysstat b, v$sysstat c
4 where a.statistic# = 40 and b.statistic# = 41 and c.statistic# = 42;
logical_reads phys_reads BUFFER HIT RATIO
------------- ---------- ----------------
15265889 58069 100
SQL> select a.value + b.value "logical_reads", c.value "phys_reads",
2 round(100 * ((a.value+b.value)-c.value) / (a.value+b.value)) "BUFFER HIT RA
TIO"
3 from v$sysstat a, v$sysstat b, v$sysstat c
4 where a.statistic# = 40 and b.statistic# = 41 and c.statistic# = 42;
logical_reads phys_reads BUFFER HIT RATIO
------------- ---------- ----------------
15265889 58069 100
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询