Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types of Index #21

Open
Joldnine opened this issue Apr 19, 2018 · 0 comments
Open

Types of Index #21

Joldnine opened this issue Apr 19, 2018 · 0 comments
Labels

Comments

@Joldnine
Copy link
Owner

Joldnine commented Apr 19, 2018

Revise types of index used in databases from the class CS4221, National University of Singapore.

(Data Structure) B+ Tree Index vs RB Tree Index, Hash, Full-text

B+ tree has more nodes in one layer. Less IO for each search.
RB Tree is too deep.

(Space Saving)Sparse vs Dense

Sparse: not all keys will be indexed. Unstable search speed but less space.
Dense: all keys will be indexed. Faster search but more space.

(Physical Storage) Clustered vs Unclustered

Clustered index: rows in the disk are stored in the same order of index, so there can only be one cluster index for the rows.
With a non clustered index there is a second list that has pointers to the physical rows.

(Logical) Primary vs Secondary, Composited

Primary key is unique.
The secondary key can be not unique.

@Joldnine Joldnine changed the title SQL: Types of Index Types of Index Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant