Cardinality (222)
The advantages of using bitmap indexes are greatest for low cardinality columns: that
is, columns in which the number of distinct values is small compared to the number of
rows in the table. If the number of distinct values of a column is less than 1% of the
number of rows in the table, or if the values in a column are repeated more than 100
times, then the column is a candidate for a bitmap index. Even columns with a lower
number of repetitions and thus higher cardinality can be candidates if they tend to be
involved in complex conditions in the WHERE clauses of queries.
For example, on a table with 1 million rows, a column with 10,000 distinct values is a
candidate for a bitmap index. A bitmap index on this column can out-perform a B-tree
index, particularly when this column is often queried in conjunction with other
columns.
B-tree indexes are most effective for high-cardinality data: that is, data with many
possible values, such as CUSTOMER_NAME or PHONE_NUMBER. In some situations, a
B-tree index can be larger than the indexed data. Used appropriately, bitmap indexes
can be significantly smaller than a corresponding B-tree index.
In ad hoc queries and similar situations, bitmap indexes can dramatically improve
query performance. AND and OR conditions in the WHERE clause of a query can be
quickly resolved by performing the corresponding Boolean operations directly on the
bitmaps before converting the resulting bitmap to rowids. If the resulting number of
rows is small, the query can be answered very quickly without resorting to a full table
scan of the table.
集的勢(集數)
1. 在基數小的列上建立點陣圖索引效果最好。所謂某列的基數小是指此列中所有不相同的值的個數要小於總行數
2. 使用點陣圖索引能夠顯著地提高查詢效能。查詢的 WHERE 子句中的 AND 和 OR 條件直接對點陣圖進行布林運算得到一個點陣圖結果集,
而無需將所有的點陣圖轉換為 ROWID。如果布林操作後的結果集較小,那麼查詢就能夠迅速得到結果,而無需進行全表掃描。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-982966/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 222
- Cardinality
- 7.40 CARDINALITY
- 測試222
- Oracle Database Cardinality FeedbackOracleDatabase
- Cardinality指什麼?
- Cardinality的計算
- 16.基數(Cardinality)
- CARDINALITY HINT用法小試
- Are we ready for learned cardinality estimation?
- 基數反饋(Cardinality Feedback)
- 那些語句使用cardinality feedback
- Cardinality Feedback基數反饋
- Codeforces Round #222 (Div. 2)
- zt:Cardinality (SQL statements) 最好的解釋SQL
- 簡單解析MySQL中的cardinality異常MySql
- 選擇率(selectivity)與基數(cardinality)
- oracle中執行計劃中的cardinalityOracle
- 高效的SQL(bitmap indexes optimize low cardinality columns)SQLIndex
- 【sql調優】cardinality測試與簡析SQL
- UVA 10892 LCM Cardinality (分解因數+暴力)
- Oracle 11gr2 新技術 Cardinality FeedbackOracle
- Oracle 11G OCP 1Z0-053 222Oracle
- [20180928]exists與cardinality.txt
- oracle cardinality對於執行計劃的影響Oracle
- 聊聊Cardinality Feedback——一種CBO優化器嘗試優化
- 遭遇Bug 5766310 Bad join cardinality is in the presence of histogramsHistogram
- 查詢計劃中集的勢(Cardinality)的計算
- PostgreSQL 原始碼解讀(222)- Locks(Lock Manager Internal Locking)SQL原始碼
- PostgreSQL多值列的選擇性-Statistics,Cardinality,Selectivity,EstimateSQL
- oracle 查詢計劃中的基數cardinality概念(二)Oracle
- oracle 查詢計劃中的基數cardinality概念(一)Oracle
- Oracle 11g SQL效能的新特性(二)- Cardinality FeedbackOracleSQL
- 222.map4-百度地圖新增覆蓋物地圖
- Oracle OCP 1Z0 053 Q222(ASM&lsdsk)OracleASM
- Deep Upsupervised Cardinality Estimation 解讀(2019 VLDB)
- 使用multicolumns statistics幫助Optimizer計算出更準確的cardinality
- 關於oracle11g的關於cardinality feedback新特性Oracle