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

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;
主站蜘蛛池模板: 吴忠市| 特克斯县| 堆龙德庆县| 保靖县| 大竹县| 阳江市| 中阳县| 凌云县| 霍林郭勒市| 永城市| 红河县| 金湖县| 略阳县| 施秉县| 漾濞| 凤台县| 岳普湖县| 安阳县| 宝兴县| 湟中县| 长阳| 犍为县| 祁连县| 澄江县| 乌兰浩特市| 修水县| 天门市| 新田县| 兖州市| 东方市| 通城县| 无为县| 雅江县| 乐安县| 讷河市| 类乌齐县| 新乡市| 南和县| 新竹市| 剑川县| 炉霍县|