Insertion with Primary Index
Overview:
tid = insert tuple into page P at position p
find location for new entry in index file
insert new index entry (k,tid) into index file
|
Problem: order of index entries must be maintained
- need to avoid overflow pages in index
- either reorganise index file or mark entries
Reogranisation requires, on average, read/write half of index file:
Costinsert,prim =
(log2i)r + i/2.(1r+1w) + (1+Ov)r + (1+δ)w
|