January 2018
Intermediate to advanced
446 pages
12h 57m
English
If you wish to drop the index on last_name, rather than directly dropping, you can mark it as invisible using the ALTER TABLE command:
mysql> EXPLAIN SELECT * FROM employees WHERE last_name='Aamodt'\G*************************** 1. row *************************** id: 1 select_type: SIMPLE table: employees partitions: NULL type: refpossible_keys: last_name key: last_name key_len: 66 ref: const rows: 205 filtered: 100.00 Extra: NULL1 row in set, 1 warning (0.00 sec)mysql> ALTER TABLE employees ALTER INDEX last_name INVISIBLE;Query OK, 0 rows affected (0.01 sec)Records: 0 Duplicates: 0 Warnings: 0mysql> EXPLAIN SELECT * FROM employees WHERE last_name='Aamodt'\G*************************** 1. row *************************** id: ...
Read now
Unlock full access