elapse time和sqlplus中显示的时间差别好大
今天作了一个测试,显示,select * from a等大量数据显示的某些情况下,v$sql中的 elapse time不到1秒,但sqlplus中设置set timing on后显示的占用时间达到20秒,可见额外的显示和数据传输等时间确实很大.怪不得有时候java程序完成 select sum(b) from a group by b比select * from b 速度快得多.[@more@]
select count(*) from abc 和 select count(某字段) from abc 的区别
今天在ORACLE 10g上做了个测试:select count(*) from abcselect count(某字段) from abc如果选择的字段为索引字段时,速度几乎一样。另外,select count(索引字段) from abc 比 select count(非索引字段) from abc 速度明显快,快3倍以上。[@more@]