This is a very old draft, from early 2007 in fact. At that time I started to look into something interesting with the index cardinality statistics reported by InnoDB tables. The cardinality varies because it's derived from estimates, and I know a decent amount about that. The interesting thing I wanted to look into was why the cardinality varies in a particular pattern.
Here I'll grab a bunch of cardinality estimates from sakila.film on MySQL 5.0.45 and put them into a file:
PLAIN TEXT CODE:
- baron@kanga:~$ while true; do mysql sakila -N -e 'show index from film' | head -n 2 | tail -n 1 | awk '{print $7}'; done> sizes
After a while I cancel it and then sort and aggregate them with counts:
PLAIN TEXT CODE:
- baron@kanga:~$ sort sizes | uniq -c …