Assumption : In case of clustered indexing, the order of the records on the disk is the same as that of the clustered indices.
Problem : Is the data rearranged each time on the disk when a new record is inserted? Isn't that a big hit on the performance in performing data moves on the disk.
Improvisation By MySQL : Each index page has a reserved space i.e. 1/16 of the space in the index page reserved for future updates.
My question: What happens when this space(reserved space) gets exhausted and a new record is waiting to be written? Does this rearrange all the data after that index page to fit in this new record? Isn't that a big hit on the performance? If yes, what are the possible workarounds?
Some additional reference : Does this directly map to the way an operating system handles internal fragmentation and the file system tries to have all the blocks corresponding to the same file stored as close as possible on the disk to save on the disk seek time? If possible, is there an explanation if the 2 are related and how?
I find the answer on the post (SQL query slow because of clustered index) by Gary Mcgill very helpful in regard to the same.