索引塊內容dump說明已經排序

gaopengtttt發表於2011-12-22
SQL> create table test
  2  as
  3  select * from dba_users order by user_id;
 
Table created
SQL> create index test_index
  2  on test( user_id
  3  );
 
Index created
analyze index test_index validate structure;
SQL> select lf_rows,lf_blks,br_rows,br_blks,del_lf_rows from index_stats;
 
   LF_ROWS    LF_BLKS    BR_ROWS    BR_BLKS DEL_LF_ROWS
---------- ---------- ---------- ---------- -----------
        22          1          0          0           0
       
SQL> alter system dump datafile 1 block 62002;
 
System altered
row#0[8021] flag: ------, lock: 0, len=11
col 0; len 1; (1):  80
col 1; len 6; (6):  00 40 f2 2a 00 00
row#1[8009] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 06
col 1; len 6; (6):  00 40 f2 2a 00 01
row#2[7997] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 0c
col 1; len 6; (6):  00 40 f2 2a 00 02
row#3[7985] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 14
col 1; len 6; (6):  00 40 f2 2a 00 03
row#4[7973] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 16
col 1; len 6; (6):  00 40 f2 2a 00 04
row#5[7961] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 19
col 1; len 6; (6):  00 40 f2 2a 00 05
row#6[7949] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 1a
col 1; len 6; (6):  00 40 f2 2a 00 06
row#7[7937] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 23
col 1; len 6; (6):  00 40 f2 2a 00 07
row#8[7925] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 24
col 1; len 6; (6):  00 40 f2 2a 00 08
row#9[7913] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 25
col 1; len 6; (6):  00 40 f2 2a 00 09
row#10[7901] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 27
col 1; len 6; (6):  00 40 f2 2a 00 0a
row#11[7889] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 28
col 1; len 6; (6):  00 40 f2 2a 00 0b
row#12[7877] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 2c
col 1; len 6; (6):  00 40 f2 2a 00 0c
row#13[7865] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 2d
col 1; len 6; (6):  00 40 f2 2a 00 0d
row#14[7853] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 2e
col 1; len 6; (6):  00 40 f2 2a 00 0e
row#15[7841] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 2f
col 1; len 6; (6):  00 40 f2 2a 00 0f
row#16[7829] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 30
col 1; len 6; (6):  00 40 f2 2a 00 10
row#17[7817] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 33
col 1; len 6; (6):  00 40 f2 2a 00 11
row#18[7805] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 37
col 1; len 6; (6):  00 40 f2 2a 00 12
row#19[7793] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 3e
col 1; len 6; (6):  00 40 f2 2a 00 13
row#20[7781] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 3f
col 1; len 6; (6):  00 40 f2 2a 00 14
row#21[7769] flag: ------, lock: 0, len=12
col 0; len 2; (2):  c1 41
col 1; len 6; (6):  00 40 f2 2a 00 15
SQL>  select dump(0 ,16) from dual;
 
DUMP(0,16)
---------------
Typ=2 Len=1: 80
SQL>  select dump(5 ,16) from dual;
 
DUMP(5,16)
-----------------
Typ=2 Len=2: c1,6
SQL>  select dump(11 ,16) from dual;
 
DUMP(11,16)
-----------------
Typ=2 Len=2: c1,c
SQL>  select dump(19 ,16) from dual;
 
DUMP(19,16)
------------------
Typ=2 Len=2: c1,14
SQL>  select dump(21 ,16) from dual;
 
DUMP(21,16)
------------------
Typ=2 Len=2: c1,16
SQL>  select dump(24 ,16) from dual;
 
DUMP(24,16)
------------------
Typ=2 Len=2: c1,19
SQL>  select dump(25 ,16) from dual;
 
DUMP(25,16)
------------------
Typ=2 Len=2: c1,1a
SQL>  select dump(34 ,16) from dual;
 
DUMP(34,16)
------------------
Typ=2 Len=2: c1,23
SQL>  select dump(35 ,16) from dual;
 
DUMP(35,16)
------------------
Typ=2 Len=2: c1,24
SQL>  select dump(36 ,16) from dual;
 
DUMP(36,16)
------------------
Typ=2 Len=2: c1,25
SQL>  select dump(38 ,16) from dual;
 
DUMP(38,16)
------------------
Typ=2 Len=2: c1,27
SQL>  select dump(39 ,16) from dual;
 
DUMP(39,16)
------------------
Typ=2 Len=2: c1,28
SQL>  select dump(43 ,16) from dual;
 
DUMP(43,16)
------------------
Typ=2 Len=2: c1,2c
SQL>  select dump(44 ,16) from dual;
 
DUMP(44,16)
------------------
Typ=2 Len=2: c1,2d
SQL>  select dump(45 ,16) from dual;
 
DUMP(45,16)
------------------
Typ=2 Len=2: c1,2e
SQL>  select dump(46 ,16) from dual;
 
DUMP(46,16)
------------------
Typ=2 Len=2: c1,2f
SQL>  select dump(47 ,16) from dual;
 
DUMP(47,16)
------------------
Typ=2 Len=2: c1,30
SQL>  select dump(50 ,16) from dual;
 
DUMP(50,16)
------------------
Typ=2 Len=2: c1,33
SQL>  select dump(54 ,16) from dual;
 
DUMP(54,16)
------------------
Typ=2 Len=2: c1,37
SQL>  select dump(61 ,16) from dual;
 
DUMP(61,16)
------------------
Typ=2 Len=2: c1,3e
SQL> select dump(62 ,16) from dual;
 
DUMP(62,16)
------------------
Typ=2 Len=2: c1,3f
 
SQL>
SQL> select dump(64 ,16) from dual;
 
DUMP(64,16)
------------------
Typ=2 Len=2: c1,41
 
可以看到索引的資訊是排序了的。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-713783/,如需轉載,請註明出處,否則將追究法律責任。

相關文章