List:General Discussion« Previous MessageNext Message »
From:Ratheesh K J Date:August 4 2006 7:19am
Subject:Cardinality
View as plain text  
Hello all,

Need an explanation for this:

I did the following - 

SELECT DISTINCT COLUMN1 FROM TBL_XXX ;

I got the foll result
----------------------------------------------------------------------------
1
2
3
4
5
7
8
10
11
12
13
14
16
17
18
19
20
21
23
24
25
26
27
28
29
30
--------------------------------------------------------------------------
Totally 26 rows

Now when I saw the Cardinality of this col ( COLUMN1 ) by doing a SHOW INDEX on TBL_XXX,
It shows 93.

How can this be possible, as Cardinality should be the number of distinct values ( 26 in
this case ) for that column right?

I also did an ANALYZE TABLE on TBL_XXX. The result is still the same.

Thanks,

Ratheesh Bhat K J

Thread
CardinalityRatheesh K J4 Aug