February 2018
Intermediate to advanced
510 pages
16h 10m
English
MySQL 8 provides you with a feature to make indexes invisible. These kinds 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 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;
Read now
Unlock full access