Created
May 21, 2013 15:11
-
-
Save krusty/5620572 to your computer and use it in GitHub Desktop.
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 characters
MariaDB []> explain select count(*) from api_person where age in (50,51) and state = 'OR'; | |
+------+-------------+------------+-------+---------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------+------+--------+------------------------------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+------+-------------+------------+-------+---------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------+------+--------+------------------------------------+ | |
| 1 | SIMPLE | api_person | range | person_age_internet,person_age_status_internet_income_worth,person_age_status_income_stage_master_internet,person3,person4,person_age | person_age_internet | 5 | NULL | 955522 | Using index condition; Using where | | |
+------+-------------+------------+-------+---------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------+------+--------+------------------------------------+ | |
1 row in set (0.00 sec) | |
MariaDB []> explain select count(*) from api_person where age in (50,51,52,53,54,55,56,57,58,59) and state = 'OR'; | |
+------+-------------+------------+------+---------------------------------------------------------------------------------------------------------------------------------------+------+---------+------+----------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+------+-------------+------------+------+---------------------------------------------------------------------------------------------------------------------------------------+------+---------+------+----------+-------------+ | |
| 1 | SIMPLE | api_person | ALL | person_age_internet,person_age_status_internet_income_worth,person_age_status_income_stage_master_internet,person3,person4,person_age | NULL | NULL | NULL | 27609895 | Using where | | |
+------+-------------+------------+------+---------------------------------------------------------------------------------------------------------------------------------------+------+---------+------+----------+-------------+ | |
1 row in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment