15 Mart 2023 Çarşamba

Clustered vs Non-clustered indexes

Clustered Index
Primary Key anlamına gelir gibi düşünülebilir. Açıklaması şöyle.  
Clustered and non-clustered indexes
The primary key index is also a clustered index, and the non-primary key index is non-clustered. 
Non-Clustered Index
CREATE INDEX ile yaratılır. Açıklaması şöyle.  
Secondary indexes are always unclustered, ie you can’t find the full row by simply searching on a secondary key value, you only get the primary key which uniquely identifies the row which you then need to scan the primary key index to find the full row. This is how MySQL is structured by default.


Hiç yorum yok:

Yorum Gönder

LIMIT ve Covering Index + Subquery

Örnek Şöyle yaparız SELECT t1.name, t1.age, t1.gender, t1.create_time FROM student as t1    INNER JOIN     (SELECT id FROM student ORDER BY ...