Додати до Chrome
It eliminates the need for any secondary indexes on the table.
It can significantly reduce I/O operations by keeping related data physically close together.
It does not affect the physical storage order of records in any way.
It always leads to faster point queries but can slow down range queries.
Sector Alignment
Block size
Rotational latency
Distance between requested and current track
2.07ms
4.17ms
16.6ms
8.3ms
Heap files
B+ trees
Log-structured storage
Slotted-page format
4
3
2
5
When there are frequent updates to the indexed attribute that require every record to be re-indexed.
When every record must be directly accessible through the index.
When the file is sorted on the search key and only one index entry per block is sufficient for retrieval.
When the file is unsorted and records are randomly stored.
A dense index stores an index entry for every search key value in the file, whereas a sparse index stores an entry for only some search key values.
A sparse index stores an entry for every record in the file, while a dense index stores only one entry per block.
Dense indexes are used exclusively for non-clustered indexes, while sparse indexes are used exclusively for clustering indexes.
Sparse indexes are unordered, whereas dense indexes are always maintained in sorted order.
Higher rotational latency
Higher seek time
Limited write endurance
Lower transfer rates
Registers
SSD
Main Memory
L3 Cache
The clustering index determines the physical order, while the non-clustering index is maintained separately and may contain multiple pointers to the same record.
The clustering index is always implemented as a dense index, whereas the non-clustering index is always implemented as a sparse index.
Both indexes determine the physical order of the records in the table.
The non-clustering index always results in faster query performance than the clustering index.