官术网_书友最值得收藏!

Supporting invisible indexes

MySQL 8 provides you with a feature to make indexes invisible. These kind of indexes cannot be used by the optimizer. In case you want to test the query performance without indexes, using this feature you can do so by making them invisible rather than dropping and re-adding an index. This is a pretty handy feature when indexing is supposed to be dropped and recreated on huge datasets.

All indexes are visible by default. To make them invisible or visible, INVISIBLE and VISIBLE keywords are used respectively, as described in the following code snippet:

ALTER TABLE table1 ALTER INDEX ix_table1_col1 INVISIBLE;
ALTER TABLE table1 ALTER INDEX ix_table1_col1 VISIBLE;
主站蜘蛛池模板: 霍邱县| 尉氏县| 武定县| 京山县| 阿坝县| 石柱| 五寨县| 西丰县| 华容县| 青川县| 板桥市| 柏乡县| 石泉县| 出国| 正宁县| 雷波县| 台山市| 江永县| 阳信县| 上林县| 美姑县| 高唐县| 饶阳县| 青海省| 轮台县| 剑阁县| 济源市| 济源市| 望都县| 永胜县| 洪湖市| 容城县| 岫岩| 梓潼县| 阿尔山市| 丰台区| 汨罗市| 西乌| 正阳县| 奇台县| 睢宁县|