公司的一个新上的oracle , 数据不大,点击访问也就一天几百, 但是登录点击页面都卡死。
查看了下AWR ,执行最慢的语句如下:
WITH allSub AS ( select id from OA_USER.hrmsubcompany start with id=26 connect by prior id= supsubcomid ) select a.idCount, b.id from (select COUNT(id) as idCount from OA_USER.HrmResource where subcompanyid1 in (SELECT a.ID FROM OA_USER.allSub a LEFT JOIN OA_USER.HRMSUBCOMPANY b ON a.ID = b.ID WHERE (b.CANCELED IS NULL OR b.CANCELED !='1')) and (loginid is not null and nvl(loginid, ' ') <> ' ')) a,(SELECT a.ID FROM OA_USER.allSub a LEFT JOIN OA_USER.HRMSUBCOMPANY b ON a.ID = b.ID WHERE (b.CANCELED IS NULL OR b.CANCELED !='1')) b
数据量不大,SQL 理应不应该执行那么久 (13S之久)
awr 中出现的异常的状况是 log file sync 等待的总时间有26.6K 秒, 次数为14,463 。纳尼,这IO 不合常理啊。
IO出现异常,测试了下操作系统, 发现 编辑个17KB的文件都会卡死。
反馈给系统,原来是 openstack 的锅。 唉 ,又找到了一个可以喷openstack 的点....