Created
September 3, 2015 10:45
-
-
Save paneq/d3251a13319e9486dcc2 to your computer and use it in GitHub Desktop.
Revisions
-
paneq created this gist
Sep 3, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ mysql> EXPLAIN SELECT `my_table_name_xxxxxxxxxxxxx`.* FROM `my_table_name_xxxxxxxxxxxxx` WHERE `my_table_name_xxxxxxxxxxxxx`.`order_id` = 2015522 LIMIT 1; +----+-------------+-----------------------------+------+-----------------------------------------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-----------------------------+------+-----------------------------------------------+------+---------+------+--------+-------------+ | 1 | SIMPLE | my_table_name_xxxxxxxxxxxxx | ALL | index_my_table_name_xxxxxxxxxxxxx_on_order_id | NULL | NULL | NULL | 280511 | Using where | +----+-------------+-----------------------------+------+-----------------------------------------------+------+---------+------+--------+-------------+ 1 row in set (0.00 sec) mysql> EXPLAIN SELECT `my_table_name_xxxxxxxxxxxxx`.* FROM `my_table_name_xxxxxxxxxxxxx` WHERE `my_table_name_xxxxxxxxxxxxx`.`order_id` = '2015522' LIMIT 1; +----+-------------+-----------------------------+------+-----------------------------------------------+-----------------------------------------------+---------+-------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-----------------------------+------+-----------------------------------------------+-----------------------------------------------+---------+-------+------+-------------+ | 1 | SIMPLE | my_table_name_xxxxxxxxxxxxx | ref | index_my_table_name_xxxxxxxxxxxxx_on_order_id | index_my_table_name_xxxxxxxxxxxxx_on_order_id | 768 | const | 1 | Using where | +----+-------------+-----------------------------+------+-----------------------------------------------+-----------------------------------------------+---------+-------+------+-------------+ 1 row in set (0.00 sec)