... continued
Explore how rows are stored in MySQL database pages through clustered and non-clustered indexes. Understand the role of storage engines like InnoDB and MyISAM in managing data order and access. Learn about index costs, page splitting, and merging, gaining foundational knowledge of MySQL data storage mechanisms.
We'll cover the following...
We have learned that pages form the leaf nodes of the tree stored on the disk. Now we’ll see how rows are stored within each page.
Page
The pages of the B-tree split and merge as required. If a page is full and a new key is inserted, the existing page splits. Similarly, if enough rows are deleted from a page it may get merged with another. There are other intricate details around how pages are managed, but they aren’t important for this introductory course on MySQL. Within a leaf-node page, the records or rows exist as a singly linked-list. The linked list enforces the index order on the rows. A new row is added to the available free space within the page. The existing records in the page aren’t moved around in case the new row appears between existing rows in index order. Instead the new row is placed in the free space available within the ...