• I didn't quite get the external fragmentation for random inserts pattern. How did it actually happen in example that after 50000 random inserts all 128 pages are out-of- order?

    128 pages for 50k rows mean that we have ~390 index entries per page at leaf lvl.

    So, say we did first 390 random inserts, then we got page split and SQL Server found an empty page somewhere ahead of the 1st initial page. So, it moved half of the data forward. Next-page pointer of the 1st page points to this 2nd page, so, these pages are ordered now, and so on, and so on.

    Or the trick is that index entries are not actually sequenced within a page (sequence is achieved through page offset pointers) - so, the half of the index that is moved contains unsequenced entries and that's why all these values are spread across 128 pages and so that's why the next-page pointers get out of order?