heap table : table without the clustering index(oracle中基本上都是heap表,IOT相当于sybase中带聚集索引的表)
APL heap table: have double-linked list.
SELECT operation: lookup FIRST column the table SYSINDEX. 因为是双向链表,由第一个页可以找到所有页,
INSERT operation:lookup root column the table SYSINDEX,root记录当前最后一个页码,新数据将插入到该页。
DELETE operation: 删除行后,紧跟的行(页)就会自动移动,以便页上的数据相邻。
UPDATE operation:有3种情况:1)修改的行数据长度没有变化,2)长度增加,如果该页面有足够的自由空间,该行记录将保持在该页的相同位置,移动其余行,3)长度增加,如果该页面没有足够的自由空间,先删除该条记录,在最后一页上添加。
DOL heap table:have ROW ID(page number+row number)
SELECT operation: 根据表的OAM找出所有页和行记录。
INSERT operation:lookup root column the table SYSINDEX,root记录当前最后一个页码,新数据将插入到该页。
DELETE operation: 删除行后,为了使页上的数据相邻,需要运行reorg reclaim_space命令。
APL表插入页竞争比DOL表厉害,解决办法:
1、APL 转化为DOL。
2、使用聚集索引,使插入数据分散在不同的页。
3、使用分区表,分散插入页。