Created
August 7, 2013 13:53
-
-
Save antonioams/6174234 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
mysql> explain select * from vicidial_list where vendor_lead_code = 1594473320 and entry_date between '2013-07-16 00:00:00' and sysdate(); | |
+----+-------------+---------------+------+---------------------------------------------------------------------------------------------+------+---------+------+---------+-------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+---------------+------+---------------------------------------------------------------------------------------------+------+---------+------+---------+-------------+ | |
| 1 | SIMPLE | vicidial_list | ALL | vendor_lead_code_entry_date,idx_vicidial_list_vendor_lead_code,idx_vicidial_list_entry_date | NULL | NULL | NULL | 2498197 | Using where | | |
+----+-------------+---------------+------+---------------------------------------------------------------------------------------------+------+---------+------+---------+-------------+ | |
1 row in set (0.00 sec) | |
mysql> select * from vicidial_list USE INDEX (idx_vicidial_list_entry_date) where vendor_lead_code = 1594473320 and entry_date between '2013-07-16 00:00:00' and sysdate(); | |
+---------+---------------------+---------------------+--------+------+------------------+-----------+---------+----------------+-------------------------+------------+--------------+-------+--------------------------------+----------------+-----------+-----------------------------+----------+----------+------+-------+----------+-------------+--------------+--------+---------------+-----------+----------------+-----------------+----------+--------------+----------------------+------+-------+---------------+ | |
| lead_id | entry_date | modify_date | status | user | vendor_lead_code | source_id | list_id | gmt_offset_now | called_since_last_reset | phone_code | phone_number | title | first_name | middle_initial | last_name | address1 | address2 | address3 | city | state | province | postal_code | country_code | gender | date_of_birth | alt_phone | email | security_phrase | comments | called_count | last_local_call_time | rank | owner | entry_list_id | | |
+---------+---------------------+---------------------+--------+------+------------------+-----------+---------+----------------+-------------------------+------------+--------------+-------+--------------------------------+----------------+-----------+-----------------------------+----------+----------+------+-------+----------+-------------+--------------+--------+---------------+-----------+----------------+-----------------+----------+--------------+----------------------+------+-------+---------------+ | |
| 2747652 | 2013-08-07 01:38:15 | 2013-08-07 01:38:15 | NEW | NULL | 1594473320 | NULL | 9017401 | -3.00 | N | 55 | 1738117144 | NULL | ANDRELINA MARTINS DOS SANTOS P | NULL | | PRACA PADRE JOAO NOLTE, 111 | | | | | BRASIL | NULL | NULL | U | NULL | | CONTA CORRENTE | BRASIL | NULL | 0 | NULL | 0 | | 0 | | |
+---------+---------------------+---------------------+--------+------+------------------+-----------+---------+----------------+-------------------------+------------+--------------+-------+--------------------------------+----------------+-----------+-----------------------------+----------+----------+------+-------+----------+-------------+--------------+--------+---------------+-----------+----------------+-----------------+----------+--------------+----------------------+------+-------+---------------+ | |
1 row in set (3.63 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment