80 Superwhorevid Id Profile Php Mode Editprofile Super Whore Vid 数据库性能诊断的七种武器

Super Whore Vid Vid

80 Superwhorevid Id Profile Php Mode Editprofile Super Whore Vid 数据库性能诊断的七种武器

80 Superwhorevid Id Profile Php Mode Editprofile Super Whore Vid

ttp%3A%2F%2Fwww.slideshare.net%2Fkamusis%2Fss-3626414" title="Add this presentation to a Group or Event" class="j-tooltip" rel="">More…

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

×

Do you like this presentation?

No comments yet

Post a comment

    Login or Signup to post a comment
    Edit your comment Cancel

    Notes on slide 1

    Enqueue 有 3 个参数: 1. P1 表示 Lock type 、 mode 比如, P1RAW 的值为 54580006 ,其中, 54 表示的是 T , 58 表示的为 X , 6 表示的专用锁; 也可以用 SELECT chr(to_char(bitand(p1,-16777216))/16777215)|| chr(to_char(bitand(p1, 16711680))/65535) "Lock", to_char( bitand(p1, 65535) ) "Mode" FROM v$session_wait WHERE event = 'enqueue' ; 来查询当前发生 enqueue 等待事件的 Lock mode ,该值对应着 V$lock 中的 lock type 2. P2 、 P3 代表 Enqueue name 的 ID1 和 ID2 ,分别对应着 V$Lock 中的 ID1 和 ID2 大多数情况下, Enqueue 的等待时间为 3 秒 在 v$Lock 中, request = 0 表示的是 Holder , >0 表示的是 waiter 确定 Enqueue 的性能: 1. 可以查询 v$sysstat 来查看 enqueue 等待 select * from v$sysstata where class = 4 2. 对于 9i ,可以查询: SELECT eq_type "Lock", total_req# "Gets", total_wait# "Waits", cum_wait_time FROM V$enqueue_stat WHERE Total_wait# > 0 ; 3. 对于 8i ,可以查询: SELECT ksqsttyp "Lock", ksqstget "Gets", ksqstwat "Waits" FROM X$KSQST where KSQSTWAT > 0; 根据这两个 sql ,确定整个系统中的 enqueue 的等待情况 几个普遍存在的 Lock mode : TX :事务锁 Note 62354.1 ; 在以下情况下发生: 1) Another session is locking the requested row. 2) When two sessions tries to insert the same unique key into a table (none of them has done a COMMIT), then the last session is waiting for the first one to COMMIT or ROLLBACK. 3) There are no free ITL (Interested Transaction List) in the block header (increase INI_TRANS och PCT_FREE for the segment). TM : DML enqueue , 一般当外键没有建立索引的时候产生, Note 38373.1 , Note 33453.1 ST : space management enqueue ,当系统存在小碎片,或者存在大量的 sort 的时候产生 Note 33567.1 JQ : Job queue UL : user lock ,当用户 DBMS_LOCK.REQUEST 时产生 SQ : sequence enqueue, 检查 sequence 的 cache size 是否过小 SS : sort segment enqueue, 检查 temp 表空间太小,是否有查询需要使用大量的 temporary 空间 HW enqueue 指和段的高水位标记相关等待;手动分配适当区可以避免这一等待 TX 是最常见的 enqueue 等待。 TX enqueue 等待通常是以下三个问题之一产生的结果: 第一个问题是唯一索引中的重复索引,你需要执行提交( commit ) / 回滚( rollback )操作来释放 enqueue 。 第二个问题是对同一位图索引段的多次更新。因为单个位图段可能包含多个行地址( rowid ),所以当多个用户试图更新同一段时,可能一个用户会锁定其他用户请求的记录,这时等待出现。直到获得锁定的用户提交或回滚, enqueue 释放。 第三个问题,也是最可能发生的问题是多个用户同时更新同一个块。如果没有足够的 ITL 槽,就会发生块 f80 Superwhorevid Id Profile Php Mode Editprofile Super Whore Vid 数据库性能诊断的七种武器a k Super Whore v80 Superwhorevid Id Profile Php Mode Editprofile Super Whore Vid 数据库性能诊断的七种武器q f r r Whore Super