After reading a few articles and some answers on Stackoverflow my baby mind has started overflowing with information. Yet I am so confused where exactly the data gets stored in SQL Server.
What I assume I know of right now:
- The page is the basic unit where the data gets stored in SQL Server
- SQL Server uses a binary tree to store the data
- There are two types of nodes: a leaf page and a non-leaf page
- The leaf pages are the one which is at the end of a B-Tree
- The index is stored in a leaf page
My questions:
- Is the data stored in leaf page?
- What gets stored in a non-leaf page?
- If index are created on the leaf page then how are they the first thing SQL Server engine checks for without going through the entire B-tree non-leaf nodes? Isn't this time-consuming.
What I have read so far:
- https://dba.stackexchange.com/questions/36815/what-are-the-differences-between-leaf-and-non-leaf-pages
- What is a page in SQL Server and do I need to worry?
- https://www.simple-talk.com/sql/performance/14-sql-server-indexing-questions-you-were-too-shy-to-ask/
Thank you