January 2018
Intermediate to advanced
446 pages
12h 57m
English
mysql> ALTER TABLE employees ADD INDEX name_desc(first_name ASC, last_name DESC);Query OK, 0 rows affected (1.61 sec)Records: 0 Duplicates: 0 Warnings: 0
mysql> EXPLAIN SELECT * FROM employees ORDER BY first_name ASC, last_name DESC LIMIT 10\G*************************** 1. row *************************** id: 1 select_type: SIMPLE table: employees partitions: NULL type: indexpossible_keys: NULL key: name_desc key_len: 124 ref: NULL rows: 10 filtered: 100.00 Extra: NULL
Read now
Unlock full access