MySQL 8 Invisible Indexes
MySQL 8 features invisible indexes. But what good is an index if you can see it? </ br> Is It Really Invisible You probably know by now that indexes can really speed up data searches. And many of you have mastered the use of EXPLAIN to see if the optimizer is using an index for your query. Which means you should know that sometimes for some queries an index does not help. mysql> CREATE TABLE t2 ( -> i INT NOT NULL, -> j INT NOT NULL, -> UNIQUE j_idx (j) -> ) ENGINE = InnoDB; Query OK, 0 rows affected (0.01 sec) mysql> insert into t2 values (1,2),(3,4),(5,6),(7,8); Query OK, 4 rows affected (0.00 sec) mysql> explain select j from t2 where j>2; +----+-------------+-------+------------+-------+---------------+-------+---------+------+------+----------+--------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+---...