MySQL中是否有UNIQUE
索引的最大大小?我的索引中有六个维度,这导致了一个庞大的索引。UNIQUE
索引是否有基数限制?
我收到奇怪的无法解释的错误,想知道UNIQUE
. 它可能来自唯一性限制吗?这是它的样子(我也不明白为什么最后三列的基数没有增加)。
+-------+------------+----------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+----------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| table | 0 | PRIMARY | 1 | column_1 | A | 15 | NULL | NULL | | BTREE | | |
| table | 0 | PRIMARY | 2 | column_2 | A | 91948 | NULL | NULL | | BTREE | | |
| table | 0 | PRIMARY | 3 | column_3 | A | 924889 | NULL | NULL | | BTREE | | |
| table | 0 | PRIMARY | 4 | column_4 | A | 15723114 | NULL | NULL | | BTREE | | |
| table | 0 | PRIMARY | 5 | column_5 | A | 15723114 | NULL | NULL | | BTREE | | |
| table | 0 | PRIMARY | 6 | column_6 | A | 15723114 | NULL | NULL | | BTREE | | |
+-------+------------+----------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+