[20220303]oracle如何定位使用library cache mutex 3.txt
[20220303]oracle如何定位使用library cache mutex 3.txt
--//這個問題實際上困擾我很久,我開始以為library cache bucket在1個chunk內,只要知道 基地址+40*buckect值 獲得偏移,定位
--//library cache bucket 的地址。
--//注:11g 下每個library cache bucket佔用16位元組,後面跟著mutex,mutex結構佔用24位元組(注:有朋友講佔用16位元組,我想與轉儲看
--//到mutex僅僅有4個值有關,4*4=16,我個人還是按照24位元組來算),這樣整個結構佔用40位元組。
--//可以參考我前面的測試 [20210524]分析library cache轉儲 3.txt
--//而實際上的情況被分成好幾個chunk,顯然無法簡單的透過 基地址+40*buckect值 計算獲得偏移,那麼oracle計算sql語句的
--//hash_value,透過hash_value值計算出bucket值, 等於hash_value % (2^_kgl_bucket_count * 256) ,知道bucket數值,
--//如何透過bucket數值來定位library cache muext的地址呢?自己嘗試做這方面的探究。
--//測試_kghdsidx_count <> 1 的情況。
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------- ---------- ----------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> alter system set "_kghdsidx_count"=3 scope=spfile;
System altered.
SYS@book> @ hide _kgl_bucket_count
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE ISSES ISSYS_MOD
----------------- ------------------------------------------------------------------ ------------- ------------- ------------ ----- ---------
_kgl_bucket_count Library cache hash table bucket count (2^_kgl_bucket_count * 256) TRUE 9 9 FALSE FALSE
--//預設2^9*256 = 131072.
--//重啟資料庫略.
SYS@book> @ hide _kghdsidx_count
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE ISSES ISSYS_MOD
--------------- ------------------ ------------- ------------- ------------ ----- ---------
_kghdsidx_count max kghdsidx count FALSE 3 3 FALSE FALSE
--//首先說明一下11g使用library cache mutex代替10g library cache latch,定位library cache mutex就很容易定位library cache
--//latch地址,僅僅偏移16位元組。而且muext結構體裡面記錄了library cache latch值。
--//參考:http://blog.itpub.net/267265/viewspace-2792123/ =>[20210915]探究mutex的值 6.txt
2.建立測試環境:
create table t as select rownum id ,'test' pad from dual connect by level<=1e6;
alter table t add constraint pk_t primary key (id);
exec dbms_stats.gather_table_stats(user, 't', method_opt=>'for all columns size 1');
alter system flush shared_pool;
$ cat tt1.txt
declare
v_pad varchar2(10);
begin
for i in 1 .. 1e5 loop
execute immediate 'select pad from t where id = ' || i into v_pad;
end loop;
end;
/
@ tt1.txt
3.轉儲library_cache:
--//有了前面的探究,這次就簡單許多。
SYS@book> oradebug setmypid
Statement processed.
SYS@book> oradebug dump library_cache 8
Statement processed.
SYS@book> @ ttt
tracefile_identifier = /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_18540.trc
$ grep "Bucket:" /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_18540.trc | sed "s/^Bucket: #=//;s/Mutex=//;s/(.*)//" >| d1.txt
--//將Bucket以及mutex地址寫入檔案d1.txt
$ awk 'NR==1{a=$1;b=strtonum($2) } NR>1{ print (strtonum($2)-b)/($1-a);a=$1;b=strtonum($2)}' d1.txt | sort | uniq -c | sort -nr
2549 40
5 304257
4 -98694
4 -77020.7
4 -229966
4 223133
4 -116978
3 -80194.5
3 -67183.1
3 -59961.5
3 -51754.9
3 -48567.5
3 -405852
3 -32871.3
3 323884
3 303913
3 -287467
3 -275967
3 -265351
3 264229
3 -26289.1
3 -24643.5
3 239068
3 -191631
3 -175487
3 147675
3 127118
3 -126593
3 -125418
3 112840
3 -108908
2 -95795.7
2 -93205.5
2 -90751.7
2 -90231.1
2 -87759
2 -87723.6
2 -85351.6
2 84402.8
2 82328.3
2 -78947.2
2 -74961.8
2 -74788.7
2 -73436.5
2 -73366
2 -65782.7
2 -61910.7
2 607786
2 -59444.2
2 -58436
2 -50110.6
2 -47116.5
2 456366
2 -44459.8
2 -43841.8
2 -42086.5
2 418339
2 -41532.2
2 -40992.3
2 -39953.5
2 -36698.2
2 -34679.6
2 -33571.6
2 -32199.7
2 -31874
2 -313604
2 -30634.6
2 -30339.7
2 -30050.4
2 -29766.5
2 -29487.9
2 -28946.1
2 -287186
2 286874
2 -27920.1
2 -26510.3
2 -263251
2 257455
2 -255522
2 -242998
2 -23715.5
2 -23363.6
2 228203
2 213639
2 -205739
2 -197428
2 196887
2 193101
2 -186451
2 -18118
2 -168257
2 164852
2 -164583
2 -164250
2 159392
2 -153297
2 -149964
2 145535
2 -143573
2 141437
2 -132656
2 132134
2 123980
2 119554
2 -113078
2 -105276
2 -102948
2 102481
2 -101879
1 -99962.4
1 -99731.6
1 98463.3
1 -98242.5
1 97279.4
1 -97145.5
1 96570.5
1 -95702.1
1 95651.2
1 -95393.7
1 93539.4
1 -92886.1
1 908942
1 90483
1 -89572.6
1 -88423.7
1 88102.9
1 -87303.9
1 -862481
1 -82271.6
1 81753.7
1 -81255.4
1 80353.4
1 79716
1 -77490
1 -766645
1 -76628.5
1 -75786
1 -75648.8
1 -75185.9
1 74959.2
1 74404.3
1 73318.7
1 73152.3
1 -73125.9
1 72606.7
1 -72321.8
1 -71836.8
1 -71766.5
1 -71535.3
1 71239.8
1 -71095.8
1 70738.4
1 -70369.9
1 -70170.8
1 -69275
1 69004.1
1 -68961.7
1 -68644.5
1 -67845.9
1 -67608.7
1 67417
1 66967.8
1 -66951.9
1 66189.2
1 66087.2
1 -658453
1 -65809.3
1 -65675.9
1 65229.5
1 -64439.3
1 -63891.3
1 -63264.3
1 -63149.8
1 -631065
1 -62688.8
1 -62082
1 62010.2
1 -61568.6
1 61196.8
1 -61023.4
1 -60719.4
1 590580
1 58972.9
1 -58469
1 -580047
1 -574974
1 -56726.6
1 -56379.4
1 -56241.4
1 557772
1 -55161.3
1 -54433.9
1 54061.9
1 540259
1 -53867.6
1 53439.9
1 -51841
1 51763.1
1 51218.6
1 511826
1 51000.3
1 -50919.5
1 501999
1 49738.9
1 -49327
1 -492829
1 -49246.9
1 -48552.7
1 478096
1 -470312
1 -46582.8
1 4614464
1 -46008.4
1 -45961.1
1 -458416
1 -45749.7
1 -45095.5
1 44658.6
1 442037
1 -44154.1
1 44071.5
1 436526
1 -43086.1
1 -42655.8
1 42318
1 -41902.2
1 41595.3
1 -41374.6
1 -41115.8
1 -40789.4
1 405204
1 -40466.3
1 -40311.9
1 401607
1 -39389.5
1 -38966
1 -38725
1 -38490.3
1 -38082.5
1 38024.1
1 -376440
1 374038
1 -36276.7
1 -35863.3
1 358582
1 -35527.9
1 35514.1
1 347323
1 346218
1 -344968
1 -33951
1 -33933
1 -329206
1 -32532
1 -31758
1 31609.7
1 -315909
1 313715
1 -31242.1
1 -30935.4
1 -30764.3
1 -30357.2
1 277867
1 -27674.8
1 -27433.8
1 2.72675e+06
1 270149
1 -26964.2
1 26535.7
1 262849
1 -25421.9
1 251019
1 2509834
1 -246395
1 244898
1 -23732.3
1 -23022
1 226178
1 -225638
1 -22527.8
1 -22147
1 -219458
1 218283
1 -21749.6
1 -215590
1 -21307.9
1 -212377
1 -21023.3
1 -20883.8
1 -2.03026e+06
1 -202906
1 202622
1 2.00788e+06
1 -197108
1 -19706.8
1 -19463
1 -193634
1 -19225.2
1 -18993.1
1 189458
1 -18879.1
1 185951
1 -182875
1 176166
1 -17512.7
1 -17415.7
1 -16765.8
1 167360
1 -166249
1 -16330.4
1 161962
1 -16079.8
1 -160568
1 159449
1 154388
1 -15297.3
1 152149
1 -15149.8
1 -15005.2
1 -149617
1 -14519.9
1 145173
1 143457
1 1434208
1 -143111
1 143039
1 1.3951e+06
1 -13940
1 -13817.4
1 137563
1 136997
1 135705
1 -135257
1 -134346
1 -13404.6
1 133896
1 133245
1 -1.32202e+06
1 -131605
1 131445
1 130419
1 -130152
1 128747
1 -123177
1 -121479
1 -118928
1 118148
1 -117548
1 115433
1 114122
1 -113493
1 -11203.7
1 111809
1 -111569
1 1115504
1 -111253
1 109298
1 1.09072e+06
1 -107775
1 106840
1 105716
1 -104508
1 -10421.9
1 103537
1 102397
1 1.01888e+06
1 100287
--//可以發現40出現次數最多,說明一個chunk內每個mutex地址的間隔是40個位元組,參考[20210524]分析library cache轉儲 3.txt 的測試。
--//出現1個很奇怪的現象,一種感覺怎麼會使用這麼多的chunk,這個好像有點問題。
$ awk 'NR==1{a=$1;b=strtonum($2) } NR>1{ print (strtonum($2)-b)/($1-a);a=$1;b=strtonum($2)}' d1.txt | sort | uniq -c | sort -nr|wc
367 734 5928
--//為什麼?我很久以前做探究時就遇到這個情況,當時想"_kghdsidx_count"=1的情況我都不清楚,這個問題就暫時先放一放。
--//現在有了前面的探究,感覺難度不是太大,自己再次嘗試看看。
--//查詢地址跳躍的情況,也就是間隔不是40的情況。
$ awk 'NR==1{a=$1;b=strtonum($2);c=$2 } NR>1{ print a,c,$1,$2,(strtonum($2)-b)/($1-a);a=$1;b=strtonum($2);c=$2}' d1.txt | grep -v "40$" | head
229 0x8678c5e0 310 0x86145828 -81255.4
447 0x86146d90 543 0x85e446d0 -32871.3
664 0x85e459b8 783 0x8678cc70 81753.7
990 0x8678ecc8 1107 0x861484b0 -56241.4
1223 0x861496d0 1389 0x85e47b00 -18993.1
1514 0x85e48e88 1648 0x86790398 72606.7
1695 0x86790af0 1855 0x8614a990 -41115.8
2019 0x8614c330 2126 0x85e49e28 -29487.9
2286 0x85e4b728 2308 0x86791ab8 442037
2552 0x867940d8 2601 0x8614ce20 -134346
--//注:太長我使用head顯示前10行。
--//取出第2個欄位,透過awk儲存aa4.txt:
$ awk 'NR==1{a=$1;b=strtonum($2);c=$2 } NR>1{ print a,c,$1,$2,(strtonum($2)-b)/($1-a);a=$1;b=strtonum($2);c=$2}' d1.txt | grep -v "40$" | awk '{print "@fchaz " $2}' > aa4.txt
$ head -3 aa4.txt
@fchaz 0x8678c5e0
@fchaz 0x86146d90
@fchaz 0x85e459b8
--//注:fcha.sql指令碼前面有prompt,pause命令,我不可能每次都按1次回車太浪費時間,我建立一個新的fchaz.sql指令碼,刪除這部分
--//內容,我自己還做了一點小改動,增加結束地址顯示。
--//先不執行如上aa4.txt指令碼,先確定bucket 0的地址看看。
$ head -1 d1.txt
16 0x8678a498
--//跟蹤檔案對應記錄內容如下:
--//Bucket: #=16 Mutex=0x8678a498(0, 6, 0, 6)
--//16*40 = 640,該bucket的地址 0x8678a498 - 16 = 0x8678a488。
SYS@book> @ tpt/calc 0x8678a488 - 640
DEC HEX
----------------------------------- --------------------
2256052744.000000 8678A208
--//bucket 0 的地址 0x8678A208
SYS@book> @ fcha 0x8678A208
Find in which heap (UGA, PGA or Shared Pool) the memory address 0x8678A208 resides...
Press ENTER to continue, CTRL+C to cancel...
LOC KSMCHPTR KSMCHIDX KSMCHDUR KSMCHCOM KSMCHSIZ KSMCHCLS KSMCHTYP KSMCHPAR
--- ---------------- ---------- ---------- ---------------- ---------- -------- ---------- ----------------
SGA 0000000086434000 2 1 permanent memor 3979784 perm 0 00
--//如果你注意前面的測試,可以發現KSMCHIDX=2,前面的測試是KSMCHIDX=1。
SYS@book> @ tpt/calc x0000000086034000 + 3979784
DEC HEX
----------------------------------- --------------------
2252339720.000000 863FFA08
--//第一個chunk的範圍是 0x86034000 - 0x863FFA08
SELECT rownum
, x$ksmmem.*
FROM X$KSMMEM
WHERE addr between hextoraw('0000000086034000') and hextoraw('00000000863FFA08')
AND ksmmmval = hextoraw('000000008678A208');
no rows selected
--//恩,沒有輸出。難道該表不在這個chunk中嗎?
--//執行如下:
spool /tmp/fchaz.txt
@aa4.txt
spool off
$ sort /tmp/fchaz.txt | uniq -c
505
505 --- ---------------- ---------- ---------- ---------------- ---------- -------- ---------- ---------------- -----------------
505 LOC KSMCHPTR KSMCHIDX KSMCHDUR KSMCHCOM KSMCHSIZ KSMCHCLS KSMCHTYP KSMCHPAR KSMCHPTR_END
114 SGA 0000000085834000 2 1 permanent memor 3968008 perm 0 00 0000000085BFCC07
170 SGA 0000000085C34000 1 1 permanent memor 3937272 perm 0 00 0000000085FF53F7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169 SGA 0000000086034000 3 1 permanent memor 3979488 perm 0 00 00000000863FF8DF
47 SGA 0000000086434000 2 1 permanent memor 3979784 perm 0 00 00000000867FFA07
1 SGA 00000000877FCDF0 2 1 permanent memor 10272 perm 0 00 00000000877FF60F
4 SGA 00000000897F1800 2 1 permanent memor 51232 perm 0 00 00000000897FE01F
1 SYS@book> @ aa4.txt
1 SYS@book> spool off
--//從輸出結果執行sort,uniq後發現看上去感覺chunk使用很多,自己上就是在6個chunk上跳來跳去。
--//根據前面測試最大可能在KSMCHIDX=1的chunk,也就是下劃線的內容指向的chunk可能性最大,當然僅僅是我的猜測。
SELECT rownum
, x$ksmmem.*
FROM X$KSMMEM
WHERE addr between hextoraw('0000000085C34000') and hextoraw('0000000085FF53F7')
AND ksmmmval = hextoraw('000000008678A208');
ROWNUM ADDR INDX INST_ID KSMMMVAL
---------- ---------------- ---------- ---------- ----------------
1 0000000085E431E8 79463997 1 000000008678A208
--//先嚐試推斷該陣列的開始地址是x85E431E8
--//2^9 = 512, 512*8 = 4096
SYS@book> @ tpt/calc x85E431E8 + 4096
DEC HEX
----------------------------------- --------------------
2246328808.000000 85E441E8
--//查詢hextoraw('0000000085E431E8') and hextoraw('0000000085E441E0')範圍的資訊:
SELECT rownum-1 rn
, x$ksmmem.*
FROM X$KSMMEM
WHERE addr between hextoraw('0000000085E431E8') and hextoraw('0000000085E441E0');
RN ADDR INDX INST_ID KSMMMVAL
---- ---------------- -------- ------- ----------------
0 0000000085E431E8 79463997 1 000000008678A208
1 0000000085E431F0 79463998 1 0000000086144FA8
2 0000000085E431F8 79463999 1 0000000085E441E8
3 0000000085E43200 79464000 1 000000008678CA08
4 0000000085E43208 79464001 1 00000000861477A8
5 0000000085E43210 79464002 1 0000000085E469E8
6 0000000085E43218 79464003 1 000000008678F208
7 0000000085E43220 79464004 1 0000000086149FA8
8 0000000085E43228 79464005 1 0000000085E491E8
9 0000000085E43230 79464006 1 0000000086791A08
10 0000000085E43238 79464007 1 000000008614C7A8
11 0000000085E43240 79464008 1 0000000085E4B9E8
12 0000000085E43248 79464009 1 0000000086794208
13 0000000085E43250 79464010 1 000000008614EFA8
14 0000000085E43258 79464011 1 0000000085E4E1E8
15 0000000085E43260 79464012 1 0000000086796A08
16 0000000085E43268 79464013 1 00000000861517A8
17 0000000085E43270 79464014 1 0000000085E509E8
18 0000000085E43278 79464015 1 0000000086799208
19 0000000085E43280 79464016 1 0000000086153FA8
20 0000000085E43288 79464017 1 0000000085E531E8
21 0000000085E43290 79464018 1 000000008679BA08
22 0000000085E43298 79464019 1 00000000861567A8
23 0000000085E432A0 79464020 1 0000000085E559E8
24 0000000085E432A8 79464021 1 000000008679E208
25 0000000085E432B0 79464022 1 0000000086158FA8
26 0000000085E432B8 79464023 1 0000000085E581E8
27 0000000085E432C0 79464024 1 00000000867A0A08
28 0000000085E432C8 79464025 1 000000008615B7A8
29 0000000085E432D0 79464026 1 0000000085E5A9E8
30 0000000085E432D8 79464027 1 00000000867A3208
31 0000000085E432E0 79464028 1 000000008615DFA8
32 0000000085E432E8 79464029 1 0000000085E5D1E8
33 0000000085E432F0 79464030 1 00000000867A5A08
34 0000000085E432F8 79464031 1 00000000861607A8
35 0000000085E43300 79464032 1 0000000085E5F9E8
36 0000000085E43308 79464033 1 00000000867A8208
37 0000000085E43310 79464034 1 0000000086162FA8
38 0000000085E43318 79464035 1 0000000085E621E8
39 0000000085E43320 79464036 1 00000000867AAA08
40 0000000085E43328 79464037 1 00000000861657A8
41 0000000085E43330 79464038 1 0000000085E649E8
42 0000000085E43338 79464039 1 00000000867AD208
43 0000000085E43340 79464040 1 0000000086167FA8
44 0000000085E43348 79464041 1 0000000085E671E8
45 0000000085E43350 79464042 1 00000000867AFA08
46 0000000085E43358 79464043 1 000000008616A7A8
47 0000000085E43360 79464044 1 0000000085E699E8
48 0000000085E43368 79464045 1 00000000867B2208
49 0000000085E43370 79464046 1 000000008616CFA8
50 0000000085E43378 79464047 1 0000000085E6C1E8
51 0000000085E43380 79464048 1 00000000867B4A08
52 0000000085E43388 79464049 1 000000008616F7A8
53 0000000085E43390 79464050 1 0000000085E6E9E8
54 0000000085E43398 79464051 1 00000000867B7208
55 0000000085E433A0 79464052 1 0000000086171FA8
56 0000000085E433A8 79464053 1 0000000085E711E8
57 0000000085E433B0 79464054 1 00000000867B9A08
58 0000000085E433B8 79464055 1 00000000861747A8
59 0000000085E433C0 79464056 1 0000000085E739E8
60 0000000085E433C8 79464057 1 00000000867BC208
61 0000000085E433D0 79464058 1 0000000086176FA8
62 0000000085E433D8 79464059 1 0000000085E761E8
63 0000000085E433E0 79464060 1 00000000867BEA08
64 0000000085E433E8 79464061 1 00000000861797A8
65 0000000085E433F0 79464062 1 0000000085E789E8
66 0000000085E433F8 79464063 1 00000000867C1208
67 0000000085E43400 79464064 1 000000008617BFA8
68 0000000085E43408 79464065 1 0000000085E7B1E8
69 0000000085E43410 79464066 1 00000000867C3A08
70 0000000085E43418 79464067 1 000000008617E7A8
71 0000000085E43420 79464068 1 0000000085E7D9E8
72 0000000085E43428 79464069 1 00000000867C6208
73 0000000085E43430 79464070 1 0000000086180FA8
74 0000000085E43438 79464071 1 0000000085E801E8
75 0000000085E43440 79464072 1 00000000867C8A08
76 0000000085E43448 79464073 1 00000000861837A8
77 0000000085E43450 79464074 1 0000000085E829E8
78 0000000085E43458 79464075 1 00000000867CB208
79 0000000085E43460 79464076 1 0000000086185FA8
80 0000000085E43468 79464077 1 0000000085E851E8
81 0000000085E43470 79464078 1 00000000867CDA08
82 0000000085E43478 79464079 1 00000000861887A8
83 0000000085E43480 79464080 1 0000000085E879E8
84 0000000085E43488 79464081 1 00000000867D0208
85 0000000085E43490 79464082 1 000000008618AFA8
86 0000000085E43498 79464083 1 0000000085E8A1E8
87 0000000085E434A0 79464084 1 00000000867D2A08
88 0000000085E434A8 79464085 1 000000008618D7A8
89 0000000085E434B0 79464086 1 0000000085E8C9E8
90 0000000085E434B8 79464087 1 00000000867D5208
91 0000000085E434C0 79464088 1 000000008618FFA8
92 0000000085E434C8 79464089 1 0000000085E8F1E8
93 0000000085E434D0 79464090 1 00000000867D7A08
94 0000000085E434D8 79464091 1 00000000861927A8
95 0000000085E434E0 79464092 1 0000000085E919E8
96 0000000085E434E8 79464093 1 00000000867DA208
97 0000000085E434F0 79464094 1 0000000086194FA8
98 0000000085E434F8 79464095 1 0000000085E941E8
99 0000000085E43500 79464096 1 00000000867DCA08
100 0000000085E43508 79464097 1 00000000861977A8
101 0000000085E43510 79464098 1 0000000085E969E8
102 0000000085E43518 79464099 1 00000000867DF208
103 0000000085E43520 79464100 1 0000000086199FA8
104 0000000085E43528 79464101 1 0000000085E991E8
105 0000000085E43530 79464102 1 00000000867E1A08
106 0000000085E43538 79464103 1 000000008619C7A8
107 0000000085E43540 79464104 1 0000000085E9B9E8
108 0000000085E43548 79464105 1 00000000867E4208
109 0000000085E43550 79464106 1 000000008619EFA8
110 0000000085E43558 79464107 1 0000000085E9E1E8
111 0000000085E43560 79464108 1 00000000867E6A08
112 0000000085E43568 79464109 1 00000000861A17A8
113 0000000085E43570 79464110 1 0000000085EA09E8
114 0000000085E43578 79464111 1 00000000867E9208
115 0000000085E43580 79464112 1 00000000861A3FA8
116 0000000085E43588 79464113 1 0000000085EA31E8
117 0000000085E43590 79464114 1 00000000867EBA08
118 0000000085E43598 79464115 1 00000000861A67A8
119 0000000085E435A0 79464116 1 0000000085EA59E8
120 0000000085E435A8 79464117 1 00000000867EE208
121 0000000085E435B0 79464118 1 00000000861A8FA8
122 0000000085E435B8 79464119 1 0000000085EA81E8
123 0000000085E435C0 79464120 1 00000000867F0A08
124 0000000085E435C8 79464121 1 00000000861AB7A8
125 0000000085E435D0 79464122 1 0000000085EAA9E8
126 0000000085E435D8 79464123 1 00000000867F3208
127 0000000085E435E0 79464124 1 00000000861ADFA8
128 0000000085E435E8 79464125 1 0000000085EAD1E8
129 0000000085E435F0 79464126 1 00000000867F5A08
130 0000000085E435F8 79464127 1 00000000861B07A8
131 0000000085E43600 79464128 1 0000000085EAF9E8
132 0000000085E43608 79464129 1 00000000867F8208
133 0000000085E43610 79464130 1 00000000861B2FA8
134 0000000085E43618 79464131 1 0000000085EB21E8
135 0000000085E43620 79464132 1 00000000867FAA08
136 0000000085E43628 79464133 1 00000000861B57A8
137 0000000085E43630 79464134 1 0000000085EB49E8
138 0000000085E43638 79464135 1 00000000867FD208
139 0000000085E43640 79464136 1 00000000861B7FA8
140 0000000085E43648 79464137 1 0000000085EB71E8
141 0000000085E43650 79464138 1 00000000877FCE10
142 0000000085E43658 79464139 1 00000000861BA7A8
143 0000000085E43660 79464140 1 0000000085EB99E8
144 0000000085E43668 79464141 1 00000000897F1820
145 0000000085E43670 79464142 1 00000000861BCFA8
146 0000000085E43678 79464143 1 0000000085EBC1E8
147 0000000085E43680 79464144 1 00000000897F4020
148 0000000085E43688 79464145 1 00000000861BF7A8
149 0000000085E43690 79464146 1 0000000085EBE9E8
150 0000000085E43698 79464147 1 00000000897F6820
151 0000000085E436A0 79464148 1 00000000861C1FA8
152 0000000085E436A8 79464149 1 0000000085EC11E8
153 0000000085E436B0 79464150 1 00000000897F9020
154 0000000085E436B8 79464151 1 00000000861C47A8
155 0000000085E436C0 79464152 1 0000000085EC39E8
156 0000000085E436C8 79464153 1 00000000897FB820
157 0000000085E436D0 79464154 1 00000000861C6FA8
158 0000000085E436D8 79464155 1 0000000085EC61E8
159 0000000085E436E0 79464156 1 0000000085834020
160 0000000085E436E8 79464157 1 00000000861C97A8
161 0000000085E436F0 79464158 1 0000000085EC89E8
162 0000000085E436F8 79464159 1 0000000085836820
163 0000000085E43700 79464160 1 00000000861CBFA8
164 0000000085E43708 79464161 1 0000000085ECB1E8
165 0000000085E43710 79464162 1 0000000085839020
166 0000000085E43718 79464163 1 00000000861CE7A8
167 0000000085E43720 79464164 1 0000000085ECD9E8
168 0000000085E43728 79464165 1 000000008583B820
169 0000000085E43730 79464166 1 00000000861D0FA8
170 0000000085E43738 79464167 1 0000000085ED01E8
171 0000000085E43740 79464168 1 000000008583E020
172 0000000085E43748 79464169 1 00000000861D37A8
173 0000000085E43750 79464170 1 0000000085ED29E8
174 0000000085E43758 79464171 1 0000000085840820
175 0000000085E43760 79464172 1 00000000861D5FA8
176 0000000085E43768 79464173 1 0000000085ED51E8
177 0000000085E43770 79464174 1 0000000085843020
178 0000000085E43778 79464175 1 00000000861D87A8
179 0000000085E43780 79464176 1 0000000085ED79E8
180 0000000085E43788 79464177 1 0000000085845820
181 0000000085E43790 79464178 1 00000000861DAFA8
182 0000000085E43798 79464179 1 0000000085EDA1E8
183 0000000085E437A0 79464180 1 0000000085848020
184 0000000085E437A8 79464181 1 00000000861DD7A8
185 0000000085E437B0 79464182 1 0000000085EDC9E8
186 0000000085E437B8 79464183 1 000000008584A820
187 0000000085E437C0 79464184 1 00000000861DFFA8
188 0000000085E437C8 79464185 1 0000000085EDF1E8
189 0000000085E437D0 79464186 1 000000008584D020
190 0000000085E437D8 79464187 1 00000000861E27A8
191 0000000085E437E0 79464188 1 0000000085EE19E8
192 0000000085E437E8 79464189 1 000000008584F820
193 0000000085E437F0 79464190 1 00000000861E4FA8
194 0000000085E437F8 79464191 1 0000000085EE41E8
195 0000000085E43800 79464192 1 0000000085852020
196 0000000085E43808 79464193 1 00000000861E77A8
197 0000000085E43810 79464194 1 0000000085EE69E8
198 0000000085E43818 79464195 1 0000000085854820
199 0000000085E43820 79464196 1 00000000861E9FA8
200 0000000085E43828 79464197 1 0000000085EE91E8
201 0000000085E43830 79464198 1 0000000085857020
202 0000000085E43838 79464199 1 00000000861EC7A8
203 0000000085E43840 79464200 1 0000000085EEB9E8
204 0000000085E43848 79464201 1 0000000085859820
205 0000000085E43850 79464202 1 00000000861EEFA8
206 0000000085E43858 79464203 1 0000000085EEE1E8
207 0000000085E43860 79464204 1 000000008585C020
208 0000000085E43868 79464205 1 00000000861F17A8
209 0000000085E43870 79464206 1 0000000085EF09E8
210 0000000085E43878 79464207 1 000000008585E820
211 0000000085E43880 79464208 1 00000000861F3FA8
212 0000000085E43888 79464209 1 0000000085EF31E8
213 0000000085E43890 79464210 1 0000000085861020
214 0000000085E43898 79464211 1 00000000861F67A8
215 0000000085E438A0 79464212 1 0000000085EF59E8
216 0000000085E438A8 79464213 1 0000000085863820
217 0000000085E438B0 79464214 1 00000000861F8FA8
218 0000000085E438B8 79464215 1 0000000085EF81E8
219 0000000085E438C0 79464216 1 0000000085866020
220 0000000085E438C8 79464217 1 00000000861FB7A8
221 0000000085E438D0 79464218 1 0000000085EFA9E8
222 0000000085E438D8 79464219 1 0000000085868820
223 0000000085E438E0 79464220 1 00000000861FDFA8
224 0000000085E438E8 79464221 1 0000000085EFD1E8
225 0000000085E438F0 79464222 1 000000008586B020
226 0000000085E438F8 79464223 1 00000000862007A8
227 0000000085E43900 79464224 1 0000000085EFF9E8
228 0000000085E43908 79464225 1 000000008586D820
229 0000000085E43910 79464226 1 0000000086202FA8
230 0000000085E43918 79464227 1 0000000085F021E8
231 0000000085E43920 79464228 1 0000000085870020
232 0000000085E43928 79464229 1 00000000862057A8
233 0000000085E43930 79464230 1 0000000085F049E8
234 0000000085E43938 79464231 1 0000000085872820
235 0000000085E43940 79464232 1 0000000086207FA8
236 0000000085E43948 79464233 1 0000000085F071E8
237 0000000085E43950 79464234 1 0000000085875020
238 0000000085E43958 79464235 1 000000008620A7A8
239 0000000085E43960 79464236 1 0000000085F099E8
240 0000000085E43968 79464237 1 0000000085877820
241 0000000085E43970 79464238 1 000000008620CFA8
242 0000000085E43978 79464239 1 0000000085F0C1E8
243 0000000085E43980 79464240 1 000000008587A020
244 0000000085E43988 79464241 1 000000008620F7A8
245 0000000085E43990 79464242 1 0000000085F0E9E8
246 0000000085E43998 79464243 1 000000008587C820
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
247 0000000085E439A0 79464244 1 0000000086211FA8
248 0000000085E439A8 79464245 1 0000000085F111E8
249 0000000085E439B0 79464246 1 000000008587F020
250 0000000085E439B8 79464247 1 00000000862147A8
251 0000000085E439C0 79464248 1 0000000085F139E8
252 0000000085E439C8 79464249 1 0000000085881820
253 0000000085E439D0 79464250 1 0000000086216FA8
254 0000000085E439D8 79464251 1 0000000085F161E8
255 0000000085E439E0 79464252 1 0000000085884020
256 0000000085E439E8 79464253 1 00000000862197A8
257 0000000085E439F0 79464254 1 0000000085F189E8
258 0000000085E439F8 79464255 1 0000000085886820
259 0000000085E43A00 79464256 1 000000008621BFA8
260 0000000085E43A08 79464257 1 0000000085F1B1E8
261 0000000085E43A10 79464258 1 0000000085889020
262 0000000085E43A18 79464259 1 000000008621E7A8
263 0000000085E43A20 79464260 1 0000000085F1D9E8
264 0000000085E43A28 79464261 1 000000008588B820
265 0000000085E43A30 79464262 1 0000000086220FA8
266 0000000085E43A38 79464263 1 0000000085F201E8
267 0000000085E43A40 79464264 1 000000008588E020
268 0000000085E43A48 79464265 1 00000000862237A8
269 0000000085E43A50 79464266 1 0000000085F229E8
270 0000000085E43A58 79464267 1 0000000085890820
271 0000000085E43A60 79464268 1 0000000086225FA8
272 0000000085E43A68 79464269 1 0000000085F251E8
273 0000000085E43A70 79464270 1 0000000085893020
274 0000000085E43A78 79464271 1 00000000862287A8
275 0000000085E43A80 79464272 1 0000000085F279E8
276 0000000085E43A88 79464273 1 0000000085895820
277 0000000085E43A90 79464274 1 000000008622AFA8
278 0000000085E43A98 79464275 1 0000000085F2A1E8
279 0000000085E43AA0 79464276 1 0000000085898020
280 0000000085E43AA8 79464277 1 000000008622D7A8
281 0000000085E43AB0 79464278 1 0000000085F2C9E8
282 0000000085E43AB8 79464279 1 000000008589A820
283 0000000085E43AC0 79464280 1 000000008622FFA8
284 0000000085E43AC8 79464281 1 0000000085F2F1E8
285 0000000085E43AD0 79464282 1 000000008589D020
286 0000000085E43AD8 79464283 1 00000000862327A8
287 0000000085E43AE0 79464284 1 0000000085F319E8
288 0000000085E43AE8 79464285 1 000000008589F820
289 0000000085E43AF0 79464286 1 0000000086234FA8
290 0000000085E43AF8 79464287 1 0000000085F341E8
291 0000000085E43B00 79464288 1 00000000858A2020
292 0000000085E43B08 79464289 1 00000000862377A8
293 0000000085E43B10 79464290 1 0000000085F369E8
294 0000000085E43B18 79464291 1 00000000858A4820
295 0000000085E43B20 79464292 1 0000000086239FA8
296 0000000085E43B28 79464293 1 0000000085F391E8
297 0000000085E43B30 79464294 1 00000000858A7020
298 0000000085E43B38 79464295 1 000000008623C7A8
299 0000000085E43B40 79464296 1 0000000085F3B9E8
300 0000000085E43B48 79464297 1 00000000858A9820
301 0000000085E43B50 79464298 1 000000008623EFA8
302 0000000085E43B58 79464299 1 0000000085F3E1E8
303 0000000085E43B60 79464300 1 00000000858AC020
304 0000000085E43B68 79464301 1 00000000862417A8
305 0000000085E43B70 79464302 1 0000000085F409E8
306 0000000085E43B78 79464303 1 00000000858AE820
307 0000000085E43B80 79464304 1 0000000086243FA8
308 0000000085E43B88 79464305 1 0000000085F431E8
309 0000000085E43B90 79464306 1 00000000858B1020
310 0000000085E43B98 79464307 1 00000000862467A8
311 0000000085E43BA0 79464308 1 0000000085F459E8
312 0000000085E43BA8 79464309 1 00000000858B3820
313 0000000085E43BB0 79464310 1 0000000086248FA8
314 0000000085E43BB8 79464311 1 0000000085F481E8
315 0000000085E43BC0 79464312 1 00000000858B6020
316 0000000085E43BC8 79464313 1 000000008624B7A8
317 0000000085E43BD0 79464314 1 0000000085F4A9E8
318 0000000085E43BD8 79464315 1 00000000858B8820
319 0000000085E43BE0 79464316 1 000000008624DFA8
320 0000000085E43BE8 79464317 1 0000000085F4D1E8
321 0000000085E43BF0 79464318 1 00000000858BB020
322 0000000085E43BF8 79464319 1 00000000862507A8
323 0000000085E43C00 79464320 1 0000000085F4F9E8
324 0000000085E43C08 79464321 1 00000000858BD820
325 0000000085E43C10 79464322 1 0000000086252FA8
326 0000000085E43C18 79464323 1 0000000085F521E8
327 0000000085E43C20 79464324 1 00000000858C0020
328 0000000085E43C28 79464325 1 00000000862557A8
329 0000000085E43C30 79464326 1 0000000085F549E8
330 0000000085E43C38 79464327 1 00000000858C2820
331 0000000085E43C40 79464328 1 0000000086257FA8
332 0000000085E43C48 79464329 1 0000000085F571E8
333 0000000085E43C50 79464330 1 00000000858C5020
334 0000000085E43C58 79464331 1 000000008625A7A8
335 0000000085E43C60 79464332 1 0000000085F599E8
336 0000000085E43C68 79464333 1 00000000858C7820
337 0000000085E43C70 79464334 1 000000008625CFA8
338 0000000085E43C78 79464335 1 0000000085F5C1E8
339 0000000085E43C80 79464336 1 00000000858CA020
340 0000000085E43C88 79464337 1 000000008625F7A8
341 0000000085E43C90 79464338 1 0000000085F5E9E8
342 0000000085E43C98 79464339 1 00000000858CC820
343 0000000085E43CA0 79464340 1 0000000086261FA8
344 0000000085E43CA8 79464341 1 0000000085F611E8
345 0000000085E43CB0 79464342 1 00000000858CF020
346 0000000085E43CB8 79464343 1 00000000862647A8
347 0000000085E43CC0 79464344 1 0000000085F639E8
348 0000000085E43CC8 79464345 1 00000000858D1820
349 0000000085E43CD0 79464346 1 0000000086266FA8
350 0000000085E43CD8 79464347 1 0000000085F661E8
351 0000000085E43CE0 79464348 1 00000000858D4020
352 0000000085E43CE8 79464349 1 00000000862697A8
353 0000000085E43CF0 79464350 1 0000000085F689E8
354 0000000085E43CF8 79464351 1 00000000858D6820
355 0000000085E43D00 79464352 1 000000008626BFA8
356 0000000085E43D08 79464353 1 0000000085F6B1E8
357 0000000085E43D10 79464354 1 00000000858D9020
358 0000000085E43D18 79464355 1 000000008626E7A8
359 0000000085E43D20 79464356 1 0000000085F6D9E8
360 0000000085E43D28 79464357 1 00000000858DB820
361 0000000085E43D30 79464358 1 0000000086270FA8
362 0000000085E43D38 79464359 1 0000000085F701E8
363 0000000085E43D40 79464360 1 00000000858DE020
364 0000000085E43D48 79464361 1 00000000862737A8
365 0000000085E43D50 79464362 1 0000000085F729E8
366 0000000085E43D58 79464363 1 00000000858E0820
367 0000000085E43D60 79464364 1 0000000086275FA8
368 0000000085E43D68 79464365 1 0000000085F751E8
369 0000000085E43D70 79464366 1 00000000858E3020
370 0000000085E43D78 79464367 1 00000000862787A8
371 0000000085E43D80 79464368 1 0000000085F779E8
372 0000000085E43D88 79464369 1 00000000858E5820
373 0000000085E43D90 79464370 1 000000008627AFA8
374 0000000085E43D98 79464371 1 0000000085F7A1E8
375 0000000085E43DA0 79464372 1 00000000858E8020
376 0000000085E43DA8 79464373 1 000000008627D7A8
377 0000000085E43DB0 79464374 1 0000000085F7C9E8
378 0000000085E43DB8 79464375 1 00000000858EA820
379 0000000085E43DC0 79464376 1 000000008627FFA8
380 0000000085E43DC8 79464377 1 0000000085F7F1E8
381 0000000085E43DD0 79464378 1 00000000858ED020
382 0000000085E43DD8 79464379 1 00000000862827A8
383 0000000085E43DE0 79464380 1 0000000085F819E8
384 0000000085E43DE8 79464381 1 00000000858EF820
385 0000000085E43DF0 79464382 1 0000000086284FA8
386 0000000085E43DF8 79464383 1 0000000085F841E8
387 0000000085E43E00 79464384 1 00000000858F2020
388 0000000085E43E08 79464385 1 00000000862877A8
389 0000000085E43E10 79464386 1 0000000085F869E8
390 0000000085E43E18 79464387 1 00000000858F4820
391 0000000085E43E20 79464388 1 0000000086289FA8
392 0000000085E43E28 79464389 1 0000000085F891E8
393 0000000085E43E30 79464390 1 00000000858F7020
394 0000000085E43E38 79464391 1 000000008628C7A8
395 0000000085E43E40 79464392 1 0000000085F8B9E8
396 0000000085E43E48 79464393 1 00000000858F9820
397 0000000085E43E50 79464394 1 000000008628EFA8
398 0000000085E43E58 79464395 1 0000000085F8E1E8
399 0000000085E43E60 79464396 1 00000000858FC020
400 0000000085E43E68 79464397 1 00000000862917A8
401 0000000085E43E70 79464398 1 0000000085F909E8
402 0000000085E43E78 79464399 1 00000000858FE820
403 0000000085E43E80 79464400 1 0000000086293FA8
404 0000000085E43E88 79464401 1 0000000085F931E8
405 0000000085E43E90 79464402 1 0000000085901020
406 0000000085E43E98 79464403 1 00000000862967A8
407 0000000085E43EA0 79464404 1 0000000085F959E8
408 0000000085E43EA8 79464405 1 0000000085903820
409 0000000085E43EB0 79464406 1 0000000086298FA8
410 0000000085E43EB8 79464407 1 0000000085F981E8
411 0000000085E43EC0 79464408 1 0000000085906020
412 0000000085E43EC8 79464409 1 000000008629B7A8
413 0000000085E43ED0 79464410 1 0000000085F9A9E8
414 0000000085E43ED8 79464411 1 0000000085908820
415 0000000085E43EE0 79464412 1 000000008629DFA8
416 0000000085E43EE8 79464413 1 0000000085F9D1E8
417 0000000085E43EF0 79464414 1 000000008590B020
418 0000000085E43EF8 79464415 1 00000000862A07A8
419 0000000085E43F00 79464416 1 0000000085F9F9E8
420 0000000085E43F08 79464417 1 000000008590D820
421 0000000085E43F10 79464418 1 00000000862A2FA8
422 0000000085E43F18 79464419 1 0000000085FA21E8
423 0000000085E43F20 79464420 1 0000000085910020
424 0000000085E43F28 79464421 1 00000000862A57A8
425 0000000085E43F30 79464422 1 0000000085FA49E8
426 0000000085E43F38 79464423 1 0000000085912820
427 0000000085E43F40 79464424 1 00000000862A7FA8
428 0000000085E43F48 79464425 1 0000000085FA71E8
429 0000000085E43F50 79464426 1 0000000085915020
430 0000000085E43F58 79464427 1 00000000862AA7A8
431 0000000085E43F60 79464428 1 0000000085FA99E8
432 0000000085E43F68 79464429 1 0000000085917820
433 0000000085E43F70 79464430 1 00000000862ACFA8
434 0000000085E43F78 79464431 1 0000000085FAC1E8
435 0000000085E43F80 79464432 1 000000008591A020
436 0000000085E43F88 79464433 1 00000000862AF7A8
437 0000000085E43F90 79464434 1 0000000085FAE9E8
504 0000000085E441A0 79464500 1 0000000085FE59E8 [456/29992]
438 0000000085E43F98 79464435 1 000000008591C820
439 0000000085E43FA0 79464436 1 00000000862B1FA8
440 0000000085E43FA8 79464437 1 0000000085FB11E8
441 0000000085E43FB0 79464438 1 000000008591F020
442 0000000085E43FB8 79464439 1 00000000862B47A8
443 0000000085E43FC0 79464440 1 0000000085FB39E8
444 0000000085E43FC8 79464441 1 0000000085921820
445 0000000085E43FD0 79464442 1 00000000862B6FA8
446 0000000085E43FD8 79464443 1 0000000085FB61E8
447 0000000085E43FE0 79464444 1 0000000085924020
448 0000000085E43FE8 79464445 1 00000000862B97A8
449 0000000085E43FF0 79464446 1 0000000085FB89E8
450 0000000085E43FF8 79464447 1 0000000085926820
451 0000000085E44000 79464448 1 00000000862BBFA8
452 0000000085E44008 79464449 1 0000000085FBB1E8
453 0000000085E44010 79464450 1 0000000085929020
454 0000000085E44018 79464451 1 00000000862BE7A8
455 0000000085E44020 79464452 1 0000000085FBD9E8
456 0000000085E44028 79464453 1 000000008592B820
457 0000000085E44030 79464454 1 00000000862C0FA8
458 0000000085E44038 79464455 1 0000000085FC01E8
459 0000000085E44040 79464456 1 000000008592E020
460 0000000085E44048 79464457 1 00000000862C37A8
461 0000000085E44050 79464458 1 0000000085FC29E8
462 0000000085E44058 79464459 1 0000000085930820
463 0000000085E44060 79464460 1 00000000862C5FA8
464 0000000085E44068 79464461 1 0000000085FC51E8
465 0000000085E44070 79464462 1 0000000085933020
466 0000000085E44078 79464463 1 00000000862C87A8
467 0000000085E44080 79464464 1 0000000085FC79E8
468 0000000085E44088 79464465 1 0000000085935820
469 0000000085E44090 79464466 1 00000000862CAFA8
470 0000000085E44098 79464467 1 0000000085FCA1E8
471 0000000085E440A0 79464468 1 0000000085938020
472 0000000085E440A8 79464469 1 00000000862CD7A8
473 0000000085E440B0 79464470 1 0000000085FCC9E8
474 0000000085E440B8 79464471 1 000000008593A820
475 0000000085E440C0 79464472 1 00000000862CFFA8
476 0000000085E440C8 79464473 1 0000000085FCF1E8
477 0000000085E440D0 79464474 1 000000008593D020
478 0000000085E440D8 79464475 1 00000000862D27A8
479 0000000085E440E0 79464476 1 0000000085FD19E8
480 0000000085E440E8 79464477 1 000000008593F820
481 0000000085E440F0 79464478 1 00000000862D4FA8
482 0000000085E440F8 79464479 1 0000000085FD41E8
483 0000000085E44100 79464480 1 0000000085942020
484 0000000085E44108 79464481 1 00000000862D77A8
485 0000000085E44110 79464482 1 0000000085FD69E8
486 0000000085E44118 79464483 1 0000000085944820
487 0000000085E44120 79464484 1 00000000862D9FA8
488 0000000085E44128 79464485 1 0000000085FD91E8
489 0000000085E44130 79464486 1 0000000085947020
490 0000000085E44138 79464487 1 00000000862DC7A8
491 0000000085E44140 79464488 1 0000000085FDB9E8
492 0000000085E44148 79464489 1 0000000085949820
493 0000000085E44150 79464490 1 00000000862DEFA8
494 0000000085E44158 79464491 1 0000000085FDE1E8
495 0000000085E44160 79464492 1 000000008594C020
496 0000000085E44168 79464493 1 00000000862E17A8
497 0000000085E44170 79464494 1 0000000085FE09E8
498 0000000085E44178 79464495 1 000000008594E820
499 0000000085E44180 79464496 1 00000000862E3FA8
500 0000000085E44188 79464497 1 0000000085FE31E8
501 0000000085E44190 79464498 1 0000000085951020
502 0000000085E44198 79464499 1 00000000862E67A8
503 0000000085E441A0 79464500 1 0000000085FE59E8
504 0000000085E441A8 79464501 1 0000000085953820
505 0000000085E441B0 79464502 1 00000000862E8FA8
506 0000000085E441B8 79464503 1 0000000085FE81E8
507 0000000085E441C0 79464504 1 0000000085956020
508 0000000085E441C8 79464505 1 00000000862EB7A8
509 0000000085E441D0 79464506 1 0000000085FEA9E8
510 0000000085E441D8 79464507 1 0000000085958820
511 0000000085E441E0 79464508 1 00000000862EDFA8
512 rows selected.
--//注意看最後一列KSMMMVAL,可以發現上下間隔不再是10240.觀察最後2位就可以確定。我開始看也懷疑該陣列是否不再這個位置或者
--//這樣的組織方式,想起前面的輸出在幾個chunk上跳來跳去,仔細看rn=0,3,6,9,12行,可以發現滿足間隔是10240.
RN ADDR INDX INST_ID KSMMMVAL
---------- ---------------- ---------- ---------- ----------------
0 0000000085E431E8 79463997 1 000000008678A208
3 0000000085E43200 79464000 1 000000008678CA08
6 0000000085E43218 79464003 1 000000008678F208
9 0000000085E43230 79464006 1 0000000086791A08
12 0000000085E43248 79464009 1 0000000086794208
--//KSMMMVAL上下相減
--//8678CA08 - 8678A208 = 10240
--//8678F208 - 8678CA08 = 10240
--//86791A08 - 8678F208 = 10240
--//86794208 - 86791A08 = 10240
--//實際上這個時候你可以大致猜測oracle定位library cache mutex地址的大致演算法與前面完全一致。
--//確定基地址A x0000000085E431E8,計算sql語句的hash_value獲得bucket值,使用bucket/256 取整就可以定位 該陣列的地址 等於
--//A + trunc(bucket/256)*8 ,再透過bucket%256 * 40 + A + trunc(bucket/256)*8 , 就知道定位該bucket的library cache mutex
--//的地址。
4.透過一個例子來講解如何定位該bucket地址的.
SYS@book> Select sysdate from dual ;
SYSDATE
-------------------
2022-03-03 09:12:01
SYS@book> @ hash
HASH_VALUE SQL_ID CHILD_NUMBER KGL_BUCKET PLAN_HASH_VALUE HASH_HEX SQL_EXEC_START SQL_EXEC_ID
---------- ------------- ------------ ---------- --------------- ---------- ------------------- -----------
381482536 dvk83p4bbtxj8 0 63016 1388734953 16bcf628 2022-03-03 09:12:01 16777216
--//HASH_VALUE=381482536,KGL_BUCKET=63016.
--//計算方法 381482536%(2^9*256) = 63016。 bucket值等於63016。
SYS@book> select trunc (63016 /256 ), mod(63016 ,256) from dual ;
TRUNC(63016/256) MOD(63016,256)
---------------- --------------
246 40
--// 0 0000000085E431E8 79463997 1 000000008678A208
--// 246 0000000085E43998 79464243 1 000000008587C820
--//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--//注意bucket從0開始計數。對應前面++++行(246行)。地址為000000008587C820.
--//246*8 = 1968
SYS@book> @ tpt/calc x0000000085E431E8 + 1968
DEC HEX
----------------------------------- --------------------
2246326680.000000 85E43998
--//注意看前面++++行,正好對應ADDR值0000000085E43998,透過這個地址,知道儲存的值KSMMMVAL=x000000008587C820
--//MOD(63016,256)=40, 40*40 = 1600
SYS@book> @ tpt/calc x000000008587C820 + 1600
DEC HEX
----------------------------------- --------------------
2240269920.000000 8587CE60
--//x8587CE60這個地址記錄的就是bucket = 63016 的開始地址。
SYS@book> oradebug setmypid
Statement processed.
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000B 00000000 0000F628 00000000
--//執行如下,注意我的測試設定session_cached_cursors=50,多次執行後會變成"軟軟解析"登入會話第一次後執行的是軟解析。
--//我採用的執行方式是執行完成馬上退出。
$ echo 'Select sysdate from dual ;'|sqlplus -s -l / as sysdba
SYSDATE
-------------------
2022-03-03 11:43:50
--//每執行以上語句1次,使用oradebug peek 0x8587CE60 40在另外會話查詢該地址 儲存前40位元組內容。
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000B 00000000 0000F628 00000000
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000C 00000000 0000F628 00000000
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000D 00000000 0000F628 00000000
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000E 00000000 0000F628 00000000
--//注意看mutex結構的第4雙位元組內容,這裡就是第8雙位元組內容的變化,0x0B->0x0C->0x0D->0x0E,每次執行後增加1.
--//你可以開啟一個新會話,執行如下:
SYS@book> Select sysdate from dual ;
SYSDATE
-------------------
2022-03-03 11:45:49
SYS@book> Select sysdate from dual ;
SYSDATE
-------------------
2022-03-03 11:45:54
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000E 00000000 0000F628 00000000
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000F 00000000 0000F628 00000000
SYS@book> oradebug peek 0x8587CE60 40
[08587CE60, 08587CE88) = 8273FC18 00000000 8273FC18 00000000 00000000 00000000 0000000F 00000000 0000F628 00000000
--//你可以發現第2次執行就是軟軟解析,不再touch該bucket。gets的數量不再增加。
SYS@book> @ sharepool/shp4 dvk83p4bbtxj8 0
TEXT KGLHDADR KGLHDPAR C40 KGLHDLMD KGLHDPMD KGLHDIVC KGLOBHD0 KGLOBHD6 KGLOBHS0 KGLOBHS6 KGLOBT16 N0_6_16 N20 KGLNAHSH KGLOBT03 KGLOBT09
--------------------- ---------------- ---------------- ---------------------------------------- ---------- ---------- ---------- ---------------- ---------------- ---------- ---------- ---------- --------- ---------- ---------- ------------- ----------
child handle address 0000000083D930D8 000000008273FC18 Select sysdate from dual 0 0 0 0000000083EBE590 0000000083EBEDA0 4528 8088 3082 15698 15698 381482536 dvk83p4bbtxj8 0
parent handle address 000000008273FC18 000000008273FC18 Select sysdate from dual 0 0 0 000000008278F0B0 00 4720 0 0 4720 4720 381482536 dvk83p4bbtxj8 65535
--//你可以發現bucket地址記錄的內容前面就是該語句sql_id=dvk83p4bbtxj8的父遊標地址x000000008273FC18.
--//如果你檢視父遊標0x81EC41D0 開始40位元組內容。
SYS@book> oradebug peek 0x000000008273FC18 40
[08273FC18, 08273FC40) = 8587CE60 00000000 8587CE60 00000000 83EBE6C8 00000000 8273FD70 00000000 00000000 10012841
--//開始部分x8587CE60正好是該bucket的地址,oracle正是透過這樣的方式連結多個bucket一樣的sql語句。
--//關於這部分內容大家可以參考,連結:http://blog.itpub.net/267265/viewspace-2775038/=>[20210602]分析library cache轉儲 5.txt
--//總之這個地址表是存在的,至於為什麼在_kghdsidx_count<>1的情況下這樣組織,我就不知道了.
5. 附上shp4.sql指令碼:
$ cat sharepool/shp4.sql
column N0_6_16 format 99999999
SELECT DECODE (kglhdadr,
kglhdpar, 'parent handle address',
'child handle address')
text,
kglhdadr,
kglhdpar,
substr(kglnaobj,1,40) c40,
KGLHDLMD,
KGLHDPMD,
kglhdivc,
kglobhd0,
kglobhd6,
kglobhs0,kglobhs6,kglobt16,
kglobhs0+kglobhs6+kglobt16 N0_6_16,
kglobhs0+kglobhs1+kglobhs2+kglobhs3+kglobhs4+kglobhs5+kglobhs6+kglobt16 N20,
kglnahsh,
kglobt03 ,
kglobt09
FROM x$kglob
WHERE kglobt03 = '&1' or kglhdpar='&1' or kglhdadr='&1' or KGLNAHSH= &2;
--//另外fcha.sql ,calc.sql指令碼來自Tanel Poder的TPT指令碼。在tanelpoder.com/downloads/可以下載。
6.今天上班重啟伺服器引數沒有改變,檢視發現該表位置不變,但是記錄bucket 0的地址發生了變化。
SYS@book> @ hide _kghdsidx_count
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE ISSES ISSYS_MOD
---------------------------------------- ------------------------------------------------------------------ ---------------------- ---------------------- ---------------------- ----- ---------
_kghdsidx_count max kghdsidx count FALSE 3 3 FALSE FALSE
SYS@book> @ hide _kgl_bucket_count
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE ISSES ISSYS_MOD
---------------------------------------- ------------------------------------------------------------------ ---------------------- ---------------------- ---------------------- ----- ---------
_kgl_bucket_count Library cache hash table bucket count (2^_kgl_bucket_count * 256) TRUE 9 9 FALSE FALSE
SELECT rownum-1 rn
, x$ksmmem.*
FROM X$KSMMEM
WHERE addr between hextoraw('0000000085E431E8') and hextoraw('0000000085E441E0');
RN ADDR INDX INST_ID KSMMMVAL
---------- ---------------- ---------- ---------- ----------------
0 0000000085E431E8 79463997 1 000000008678A508
1 0000000085E431F0 79463998 1 0000000086144FA8
2 0000000085E431F8 79463999 1 0000000085E441E8
3 0000000085E43200 79464000 1 000000008678CD08
4 0000000085E43208 79464001 1 00000000861477A8
5 0000000085E43210 79464002 1 0000000085E469E8
6 0000000085E43218 79464003 1 000000008678F508
7 0000000085E43220 79464004 1 0000000086149FA8
8 0000000085E43228 79464005 1 0000000085E491E8
9 0000000085E43230 79464006 1 0000000086791D08
...
SYS@book> @ fchaz 000000008678A508
LOC KSMCHPTR KSMCHIDX KSMCHDUR KSMCHCOM KSMCHSIZ KSMCHCLS KSMCHTYP KSMCHPAR KSMCHPTR_END
--- ---------------- ---------- ---------- ---------------- ---------- -------- ---------- ---------------- -----------------
SGA 0000000086434000 1 1 permanent memor 3980552 perm 0 00 00000000867FFD07
--//不知道為什麼,僅僅做一個記錄吧。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2864483/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20220301]oracle如何定位使用library cache mutex.txtOracleMutex
- [20220302]oracle如何定位使用library cache mutex 2.txtOracleMutex
- Oracle Library cache mutex x tipsOracleMutex
- [20201203]探究library cache mutex X 3.txtMutex
- zt_如何使用event 10049分析定位library cache lock and library cache pin
- 'cursor:mutex ..'/ 'cursor:pin ..'/ 'library cache:mutex ..'型別的等待事件Mutex型別事件
- library cache: mutex X引發的故障Mutex
- 用markhot緩解library cache:mutex xMutex
- 定位Library Cache pin,Library Cache lock等待的解決方法
- oracle11g library cache-mutex x的處理測試OracleMutex
- [20170727]library cache: mutex X.txtMutex
- [20241108]跟蹤library cache lock library cache pin使用gdb(11g)3.txt
- Oracle Library cacheOracle
- 常用定位library cache lock的方法
- [20190402]Library Cache mutex.txtMutex
- Library Cache: Mutex X – Bug 20879889 – Fixed in 11.2.0.4Mutex
- [20210520]11g shared pool latch與library cache mutex的簡單探究3.txtMutex
- oracle library cache之library cache lock_library cache pin wait event釋義OracleAI
- [20210524]分析library cache轉儲 3.txt
- oracle異常:library cache lockOracle
- zt_如何平面解決library cache lock和library cache pin
- 【ASK_ORACLE】Library Cache概念篇(二)之Library Cache Pin的定義Oracle
- 11G資料庫之library cache lock及library cache pin模擬結合hanganalyze定位資料庫
- oracle library cache之trace小記Oracle
- Library Cache Pin 及 Library Cache Lock分析
- library cache lock和library cache pin理解
- [20220304]測試library cache mutex遇到的疑問.txtMutex
- [20240824]跟蹤library cache lock library cache pin使用gdb.txt
- library cache pin和library cache lock的診斷分析
- library cache lock和library cache pin區別總結
- 【TUNE_ORACLE】等待事件之“library cache lock”Oracle事件
- Oracle Library cache內部機制詳解Oracle
- oracle 10049 event之library cache lockOracle
- oracle11g之v$libcache_locks處理library cache lock及library cache pinOracle
- 0106library cache pin的快速定位與解決
- [20240920]跟蹤library cache lock library cache pin使用gdb.txt
- 故障:核心表業務高峰期授權導致library cache lock和mutex x競爭Mutex
- 【TUNE_ORACLE】等待事件之“library cache pins”Oracle事件