-
-
Save archon810/0f6bb97e5a7e29e4d1e9 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 SELECT pollip_aid FROM wp_pollsip WHERE pollip_qid = 158 AND pollip_ip = '157.56.92.155'; | |
+----+-------------+------------+------+---------------+------+---------+------+--------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+------------+------+---------------+------+---------+------+--------+-------------+ | |
| 1 | SIMPLE | wp_pollsip | ALL | pollip_qid | NULL | NULL | NULL | 914036 | Using where | | |
+----+-------------+------------+------+---------------+------+---------+------+--------+-------------+ | |
1 row in set | |
KEY `pollip_qid_2` (`pollip_qid`, `pollip_ip`) | |
mysql> explain SELECT SQL_NO_CACHE pollip_aid FROM wp_pollsip USE INDEX (pollip_qid_2) WHERE pollip_qid = 158 AND pollip_ip = '157.56.92.155'; | |
+----+-------------+------------+------+---------------+------+---------+------+--------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+------------+------+---------------+------+---------+------+--------+-------------+ | |
| 1 | SIMPLE | wp_pollsip | ALL | pollip_qid_2 | NULL | NULL | NULL | 914053 | Using where | | |
+----+-------------+------------+------+---------------+------+---------+------+--------+-------------+ | |
1 row in set | |
KEY `pollip_qid_2` (`pollip_ip`,`pollip_qid`) | |
mysql> explain SELECT SQL_NO_CACHE pollip_aid FROM wp_pollsip USE INDEX (pollip_qid_2) WHERE pollip_qid = 158 AND pollip_ip = '157.56.92.155'; | |
+----+-------------+------------+------+---------------+--------------+---------+-------+------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+------------+------+---------------+--------------+---------+-------+------+-------------+ | |
| 1 | SIMPLE | wp_pollsip | ref | pollip_qid_2 | pollip_qid_2 | 102 | const | 1 | Using where | | |
+----+-------------+------------+------+---------------+--------------+---------+-------+------+-------------+ | |
1 row in set | |
mysql> explain SELECT SQL_NO_CACHE pollip_aid FROM wp_pollsip WHERE pollip_qid = 158 AND pollip_ip = '157.56.92.155'; | |
+----+-------------+------------+------+-------------------------+--------------+---------+-------+------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+------------+------+-------------------------+--------------+---------+-------+------+-------------+ | |
| 1 | SIMPLE | wp_pollsip | ref | pollip_qid,pollip_qid_2 | pollip_qid_2 | 102 | const | 1 | Using where | | |
+----+-------------+------------+------+-------------------------+--------------+---------+-------+------+-------------+ | |
1 row in set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment