Talk:Cardinality (SQL statements)
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Cardinality in math
editShouldn't this article point to Cardinality, somehow?
--Jerome Potts (talk) 05:30, 11 January 2008 (UTC)
SQL
editCardinality is not peculiar to SQL. GregorB (talk) 20:02, 30 January 2008 (UTC)
Input from DerekAsirvadem
editI removed the following paragraphs from the 05:42, 29 January 2009 version of the article, as the notes are more appropriate on the discussion page. The notes were added by DerekAsirvadem. Currently, I don't have an opinion about the notes. But let's discuss them.
1 There is no such thing as "normal" cardinality. In order for such a concept to exist, there must be some pre-existing measure (there is not). Cardinality is a relative term, relative to the object: if the table has a million rows, and there are close to a milliion values, the column has high cardinality; if the values are few, the column has low cardinality. There is no measure outside the table against which "normal" can be determined.
2 The highest level of cardinality is uniqueness: one unique value per row. That may well be a range of more than one million values.
3 The definiions are adequate but the examples are poor.
Low cardinality and use of Index.
editI am using SAP and one mandatory field in most of the tables that is MANDT. This is taken a s primary key or a part or a secondary index key and becomes a pre included field in all the queries. Even if an ABAPER does not write it so, till it comes as a result of translation by SAP. Typically a production system does not have many client or rather say a few clients only. So this is a very low cardianlity column in most of the table consisting millions of rows...
There is also a rule which says that the indexing a column of low cardinality type to be avoided.. and hence there is the confusion.
What is correct? Indexing or not in a low cardianlity column?
59.160.30.29 (talk) 07:21, 25 March 2009 (UTC)Soumen(http://soumen.wordpress.com)
- OK, this is not what talk pages are for, but here it is anyway... Indexing a column of low cardinality makes sense when:
- using bitmap indexes
- the column in question is a part of a composite index. GregorB (talk) 19:32, 17 July 2009 (UTC)