Invisible Indexes •For comparisons of strings to indexed generated columns that compute a value from a JSON function that returns a quoted string,  JSON_UNQUOTE()  is needed in the column definition to remove the extra quotes from the function value. (For direct comparison of a string to the function result, the JSON comparator handles quote removal, but this does not occur for index lookups.) For example, instead of writing a column definition like this: •If the optimizer picks the wrong index, an index hint can be used to disable it and force the optimizer to make a different choice. 1727 Invisible indexes make it possible to test the effect of removing an index on query performance, without making a destructive change that must be undone should the index turn out to be required. Dropping and Information about whether an index is visible or invisible is available from the INFORMATION_SCHEMA.STATISTICS  table or  SHOW INDEX  output. For example: To alter the visibility of an existing index, use a  VISIBLE  or  INVISIBLE  keyword with the  ALTER TABLE ... ALTER INDEX  operation: MySQL supports invisible indexes; that is, indexes that are not used by the optimizer. The feature applies to indexes other than primary keys (either explicit or implicit). Indexes are visible by default. To control visibility explicitly for a new index, use a  VISIBLE  or  INVISIBLE keyword as part of the index definition for  CREATE TABLE ,  CREATE INDEX , or  ALTER TABLE : Without  JSON_UNQUOTE()  in the column definition, the optimizer detects a match only for the first of those comparisons. With the latter definition, the optimizer can detect a match for both of these comparisons: Write it like this: 8.3.12 Invisible Indexes doc_name TEXT AS (JSON_EXTRACT(jdoc, ’$.name’)) STORED doc_name TEXT AS (JSON_UNQUOTE(JSON_EXTRACT(jdoc, ’$.name’))) STORED ... WHERE JSON_EXTRACT(jdoc, ’$.name’) = ’ some_string ’ ... ... WHERE JSON_UNQUOTE(JSON_EXTRACT(jdoc, ’$.name’)) = ’ some_string ’ ... CREATE TABLE t1 ( i INT, j INT, k INT, INDEX i_idx (i) INVISIBLE ) ENGINE = InnoDB; CREATE INDEX j_idx ON t1 (j) INVISIBLE; ALTER TABLE t1 ADD INDEX k_idx (k) INVISIBLE; ALTER TABLE t1 ALTER INDEX i_idx INVISIBLE; ALTER TABLE t1 ALTER INDEX i_idx VISIBLE; mysql>  SELECT INDEX_NAME, IS_VISIBLE FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = ’db1’ AND TABLE_NAME = ’t1’; +------------+------------+ | INDEX_NAME | IS_VISIBLE | +------------+------------+ | i_idx | YES | | j_idx | NO | | k_idx | NO | +------------+------------+