educative.io

So do non-clustered indexes point to rows or pages?

Hi!
It was said that leaf nodes of clustered indexes have pages with rows inside, and page is the smallest unit of a data in DB. But in this lesson in the last paragraph starting with “This could be catastrophic if the leaf nodes of an InnoDB secondary index pointed to row locations on disk” and after that as well there is the same notion - do does it mean that non-clustered indexes leaf nodes point to individual rows, but not to the page with the row, or how does it work?
Thanks!


Course: https://www.educative.io/collection/5352985413550080/6335716377231360
Lesson: https://www.educative.io/collection/page/5352985413550080/6335716377231360/5601324986007552

Hi @Dmitry_Polovinkin, Thank you for contacting the Educative team with your query!

If the clustered index does not exist in the table then the leaf nodes of non-clustered indexes point to the heap page where data is stored (Heap is an unordered or randomly ordered row of data). Leaf pages of non-clustered indexes do not contain actual data they only contain the pointers. We have attached a screenshot that may help you in understanding.

Hope you have an amazing learning experience on Educative!

Untitled.drawio