oracle中与索引相关的视图---all_indexes(四)

2014-11-24 09:14:15 · 作者: · 浏览: 1
into iot_over_inc values(5,dbms_random.string('u',20),dbms_random.string('u',20),dbms_random.string('u',40)); 已创建 1 行。 SQL> insert into iot_over_inc values(6,dbms_random.string('u',400),dbms_random.string('u',20),dbms_random.string('u',40)); 已创建 1 行。 查看索引块的数据结构:
row#0[7962] flag: K-----, lock: 0, len=70
col 0; len 1; (1):  31
tl: 66 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [20]  54 50 46 52 56 4d 4a 53 4c 42 42 58 47 47 4c 4d 52 4c 4e 59
col  1: [20]  4a 43 4a 59 50 42 54 56 45 42 4f 57 4b 4d 4b 4f 4e 4f 4b 4c
col  2: [20]  50 57 59 44 4c 4a 4c 4c 53 52 49 54 58 41 47 4a 52 59 4d 41
row#1[7907] flag: K-----, lock: 0, len=55
col 0; len 1; (1):  32
tl: 51 fb: --H-F--- lb: 0x0  cc: 2
nrid:  0x0b80000a.0
col  0: [20]  4d 45 52 44 50 54 51 5a 46 59 56 55 50 4e 5a 4d 4d 4b 50 4f
col  1: [20]  49 4c 4d 54 49 41 43 57 48 44 46 55 54 58 56 52 4b 49 51 52
row#2[7894] flag: K-----, lock: 0, len=13
col 0; len 1; (1):  33
tl: 9 fb: --H-F--- lb: 0x0  cc: 0
nrid:  0x0b80000a.1
row#3[7860] flag: K-----, lock: 2, len=34
col 0; len 1; (1):  34
tl: 30 fb: --H-F--- lb: 0x0  cc: 1
nrid:  0x0b80000a.2
col  0: [20]  59 4c 56 44 4e 52 47 42 49 51 52 4e 4a 51 54 44 41 43 44 57
row#4[7826] flag: K-----, lock: 2, len=34
col 0; len 1; (1):  35
tl: 30 fb: --H-F--- lb: 0x0  cc: 1
nrid:  0x0b80000a.3
col  0: [20]  5a 4a 50 57 41 52 4b 55 4b 4f 48 58 53 5a 53 52 41 4b 52 56
row#5[7813] flag: K-----, lock: 2, len=13
col 0; len 1; (1):  36
tl: 9 fb: --H-F--- lb: 0x0  cc: 0
nrid:  0x0b80000a.4
----- end of leaf block dump -----
End dump data blocks tsn: 32 file#: 46 minblk 18 maxblk 18
综上,可以得出如下结论: 在索引组织表中,主键必须存储在索引结构中,即主键列的大小不可以超过pctthreshold的值。在没有指定including子句的情况下,oracle会仅可能的将更多的列存储在iot-top段中,无法放在iot-top段中的内容存储在overflow段中。在指定了including子句的情况下,oracle会尽可能的将从column_id小于等于including子句指定的列存放在iot-top段中,而其他的字段无条件存放在overflow段中通过incluing子句指定的字段,在all_indexes视图的includ_column列中通过column id 的形式标出
VISIBILITY: 索引的可见性,可以用来测试删除某一索引可能带来的影响,也可以实现某些其他作用,例如:通过OPTIMIZER_USE_INVISIBLE_INDEXES参数,使得部分程序可以利用索引,而其他程序不可以利用索引。