zt:Cardinality (SQL statements) 最好的解釋
http://www.itpub.net/thread-934862-1-1.html
In SQL, the term cardinality refers to the uniqueness of data values contained in a particular column (attribute) of a database table.
When dealing with columnar value sets, there are 3 types of cardinality: high-cardinality, normal-cardinality, and low-cardinality.
High-Cardinality
High-cardinality refers to data table column values that are very uncommon. High-cardinality column values are typically identification numbers, email addresses, or user names. An example of a data table column with high-cardinality would be a USERS table with a column named USER_ID. This column would contain unique values of 1-n. Each time a new user is created in the USERS table, a new number would be created in the USER_ID column to identify them uniquely. Since the values held in the USER_ID column are unique, this column's cardinality type would be referred to as high-cardinality.
Normal-Cardinality
Normal-cardinality refers to data table column values that are somewhat uncommon. Normal-cardinality column values are typically names, street addresses, or vehicle types. An example of a data table column with normal-cardinality would be a CUSTOMER table with a column named LAST_NAME. This column would contain the last names of customers. While some people have common last names, such as Smith, others have uncommon last names. Therefore, an examination of all of the values held in the LAST_NAME column would show "clumps" of names in some places (e.g.: a lot of Smith's ) surrounded on both sides by a long series of unique values. Since there is a variety of possible values held in this column, its cardinality type would be referred to as normal-cardinality.
Low-Cardinality
Low-cardinality refers to data table column values that are not very unusual. Low-cardinality column values are typically status flags, boolean values, or major classifications such as gender. An example of a data table column with low-cardinality would be a CUSTOMER table with a column named NEW_CUSTOMER. This column would contain only 2 distinct values: Y or N, denoting whether the customer was new or not. Since there are only 2 possible values held in this column, its cardinality type would be referred to as low-cardinality.
Retrieved from ""
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-998928/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Parallel Execution of SQL StatementsParallelSQL
- Oracle Text SQL Statements and OperatorsOracleSQL
- 高效的SQL(bitmap indexes optimize low cardinality columns)SQLIndex
- Oracle Standby 以及其中的引數解釋 (zt)Oracle
- Spark SQL的官網解釋SparkSQL
- 引數session_cached_cursors的詳細解釋(zt)Session
- 【sql調優】cardinality測試與簡析SQL
- 程式碼才是最好的註釋
- Oracle 11g SQL效能的新特性(二)- Cardinality FeedbackOracleSQL
- [zt] 影響SQL效能的原因SQL
- 產生top sql的原因(zt)SQL
- How to check why identical SQL Statements have high version countIDESQL
- [20130117]Analyzing a SQL Trace File with SQL Statements.txtSQL
- 幾個非常經典的對“資料倉儲”的解釋(ZT)
- SQL Server專題 [zt]SQLServer
- sql mode 型別(ZT)SQL型別
- redhat ntsysv中一些服務的簡單解釋(zt)Redhat
- SQL SERVER DBCC命令解釋SQLServer
- 幽默:SQL Join形象解釋SQL
- Cardinality
- [zt] Oracle與SQL Server的互連OracleSQLServer
- SQL*PLUS命令的使用大全(zt)(轉)SQL
- 【OCP最新題庫解析(052)--題7】 Examine theses SQL statements and outputSQL
- Cardinality的計算
- 產生遞迴呼叫 (Recursive Call 或 recursive SQL statements) 的幾種情況遞迴SQL
- Oracle SQL optimization-2(zt)OracleSQL
- SQL Access Advisor(zt)SQL
- [精華zt] SQL調優整理SQL
- MySQL 8.0 Reference Manual(讀書筆記53節--Optimizing SQL Statements)MySql筆記
- SQL聯合語句的視覺解釋SQL視覺
- ZT:Linux BIOS贏來了它發展的最好時機LinuxiOS
- 7.40 CARDINALITY
- 【DBA】Oracle 11g 針對SQL效能的新特性(二)- Cardinality FeedbackOracleSQL
- 畫圖解釋 SQL join 語句圖解SQL
- 利用SQL解釋一個魔術SQL
- SQL優化器探討(zt)SQL優化
- oracle 特殊SQL(TABLE( CAST( MULTISET()[zt]OracleSQLAST
- [zt] sql server 死鎖總結SQLServer