Within my B+Tree I have ordered keys at the leaf levels, with data pointers to a separate data file. This question refers to the order of data within this data file.
As I see it, When ordered:
It's Easier to load all the data in a block when one is read, as data is stored in the same order as its keys, so you only have to check if adjacent data pointers are in the same block.
Less reads when accessing a lot of adjacent data or performing ranges, as data is more likely to be contained in the same block.
Increased fragmentation and writes when deleting/splitting/inserting
when not ordered:
Decreased writes when inserting, as data is just appended to the end of the last block associated with the node.
Increased reads when performing ranges, as data is less likely to be split between multiple blocks.
It's a lot slower to find the entry that other data belongs to within the same block, as you have to loop through all the entries in the nodes checking their data pointers.
Alternatively, should I just load entire nodes into memory when I need to access data from an entry within that node?
Looking for a second opionion on the best way I should be storing data (ordered/unordered) and how many data pointers should I be loading when performing a simple "get" for one value?
Thanks!