How SQL Server indexing works

前端 未结 2 1099
小蘑菇
小蘑菇 2021-02-15 10:28

SQL Server uses binary tree with intermediate and leaf node for search but how it will do this. Ex. If a table employee has two fields

Id bigint 
Name varchar(5         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-02-15 10:31

    How It Works

    The database takes the columns specified in a CREATE INDEX command and sorts the values into a special data structure known as a B-tree. A B-tree structure supports fast searches with a minimum amount of disk reads, allowing the database engine to quickly find the starting and stopping points for the query we are using.


    For more info, check THIS!

提交回复
热议问题