Index architecture.2FIndexing Methods Database index
1 index architecture/indexing methods
1.1 non-clustered
1.2 clustered
1.3 cluster
index architecture/indexing methods
non-clustered
the data present in arbitrary order, logical ordering specified index. data rows may spread throughout table regardless of value of indexed column or expression. non-clustered index tree contains index keys in sorted order, leaf level of index containing pointer record (page , row number in data page in page-organized engines; row offset in file-organized engines).
in non-clustered index,
the physical order of rows not same index order.
the indexed columns typically non-primary key columns used in join, where, , order clauses.
there can more 1 non-clustered index on database table.
clustered
clustering alters data block distinct order match index, resulting in row data being stored in order. therefore, 1 clustered index can created on given database table. clustered indices can increase overall speed of retrieval, data accessed sequentially in same or reverse order of clustered index, or when range of items selected.
since physical records in sort order on disk, next row item in sequence before or after last one, , fewer data block reads required. primary feature of clustered index therefore ordering of physical data rows in accordance index blocks point them. databases separate data , index blocks separate files, others put 2 different data blocks within same physical file(s).
cluster
when multiple databases , multiple tables joined, s referred cluster (not confused clustered index described above). records tables sharing value of cluster key shall stored in same or nearby data blocks. may improve joins of these tables on cluster key, since matching records stored , less i/o required locate them. cluster configuration defines data layout in tables parts of cluster. cluster can keyed b-tree index or hash table. data block table record stored defined value of cluster key.
Comments
Post a Comment