データを挿入すると、ライター DB インデックス統計が更新されます。
ただし、Reader DB Indices 統計は更新されません。
サンプルはこちらです。
データベース。
create database test;
テーブル。
CREATE TABLE test(
test_id INT NOT NULL PRIMARY KEY,
test_txt CHAR(8) DEFAULT NULL,
INDEX test_txt(test_txt)
);
作家。
mysql> insert into test values(1, 'test1');
Query OK, 1 row affected (0.01 sec)
mysql> show index from test;
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| test | 0 | PRIMARY | 1 | test_id | A | 1 | NULL | NULL | | BTREE | | |
| test | 1 | test_txt | 1 | test_txt | A | 1 | NULL | NULL | YES | BTREE | | |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
2 rows in set (0.00 sec)
読者。
mysql> show index from test;
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| test | 0 | PRIMARY | 1 | test_id | A | 0 | NULL | NULL | | BTREE | | |
| test | 1 | test_txt | 1 | test_txt | A | 0 | NULL | NULL | YES | BTREE | | |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
2 rows in set (0.00 sec)
カーディナリティがリーダーのみ更新されないのはなぜですか??
パラメータ グループはデフォルトです。
その理由を教えてください。