Composite Indexes (196)

tsinglee發表於2007-11-14

A composite index (also called a concatenated index) is an index that you create on
multiple columns in a table. Columns in a composite index can appear in any order
and need not be adjacent in the table.

Composite indexes can speed retrieval of data for SELECT statements in which the
WHERE clause references all or the leading portion of the columns in the composite
index. Therefore, the order of the columns used in the definition is important.
Generally, the most commonly accessed or most selective columns go first.

No more than 32 columns can form a regular composite index. For a bitmap index, the
maximum number columns is 30. A key value cannot exceed roughly half (minus
some overhead) the available data space in a data block.

複合索引(連線索引)
1. 合索引內的列可以任意排列,她們在資料表中也無需相鄰.
2. 如果一個 SELECT 語句的 WHERE 子句中引用了複合索引的全部列或自首列開始且連續的部分列,將有助於提高此查詢的效能
3. 一個常規的複合索引不能超過 32 列,而點陣圖索引不能超過 30 列.

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-982357/,如需轉載,請註明出處,否則將追究法律責任。

相關文章