Clustered index:
Nonclustered index:
Some notes:
Table has cluster index, it is called clustered table. Table doesn't have clustered table, it is called a heap.
The pointer to data row is called a row locator. In a heap, row locator is pointer to the row. In clustered table, row locator is clustered index key.
- sort and store data rows based on the key value. The index can include more than one columns. There is only one cluster index per table.
- read fast and write slow for rearrange the data in table.
Nonclustered index:
- contains index key values and each key value entry has a pointer to data row that contains the key value - pointer to physical rows.
- have many indexes per table.
Some notes:
Table has cluster index, it is called clustered table. Table doesn't have clustered table, it is called a heap.
The pointer to data row is called a row locator. In a heap, row locator is pointer to the row. In clustered table, row locator is clustered index key.
Nhận xét
Đăng nhận xét