Created
March 17, 2014 13:32
-
-
Save spetrunia/9599260 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> explain extended select * from t100 where col1 < 5 order by key1 limit 10; | |
+------+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra | | |
+------+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ | |
| 1 | SIMPLE | t100 | index | NULL | key1 | 5 | NULL | 10 | 0.99 | Using where | | |
+------+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ | |
1 row in set, 1 warning (0.00 sec) | |
mysql> explain extended select * from t100 where col1 > 5 order by key1 limit 10; | |
+------+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra | | |
+------+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ | |
| 1 | SIMPLE | t100 | index | NULL | key1 | 5 | NULL | 10 | 99.01 | Using where | | |
+------+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ | |
1 row in set, 1 warning (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment