dual是一个oracle表。具体用处不说了。这里聊聊有用的。
客户的一个系统,60分钟statspack采样,发现select count(*) from dual 在这段时间共执行6,775,149次,平均每秒执行1800次。而每次执行该语句逻辑读3个——巨大的消耗。
Popularity: 31% [?]
转自 http://tolywang.itpub.net/post/48/70906
概述
造成数据库性能下降或挂起的原因很多,”library cache pin”等待是其中之一.当数据库性能严重下降或挂起时,我们通过查询v$session_wait,发现大量的”library cache pin”等待,查询的SQL语句如下:
#su – oracle
$svrmgrl
svrmgr>connect internal
svrmgr>select sid,event,p1,p2,p3 from v$session_wait where wait_time=0;
SID EVENT P1 P2 P3
———- ————————- ———- ———- ————–
9 library cache pin 15417016 10090832 20
154 library cache pin 15417016 11224168 20
341 library cache pin 15417016 11449936 20
349 library cache pin 15417016 16489792 20
390 library cache pin 15417016 11992536 20
160 library cache pin 15417016 6166600 20
20 library cache pin 15417016 10868760 20
Popularity: 25% [?]