Advertisement
Guest User

Untitled

a guest
May 28th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.34 KB | None | 0 0
  1. mysql> explain select calltime  as acd from cdrs where start >= '1432771200' and start <= unix_timestamp('2015-05-28 23:59:59') and station = 10;
  2. +----+-------------+-------+-------+---------------+-------+---------+------+------+-------------+
  3. | id | select_type | table | type  | possible_keys | key   | key_len | ref  | rows | Extra       |
  4. +----+-------------+-------+-------+---------------+-------+---------+------+------+-------------+
  5. |  1 | SIMPLE      | cdrs  | range | start,station | start | 27      | NULL | 5558 | Using where |
  6. +----+-------------+-------+-------+---------------+-------+---------+------+------+-------------+
  7. 1 row in set (0.00 sec)
  8.  
  9. mysql> explain select calltime  as acd from cdrs where start >= unix_timestamp('2015-05-28 02:00:00') and start <= unix_timestamp('2015-05-28 23:59:59') and station = 10;
  10. +----+-------------+-------+------+---------------+------+---------+------+---------+-------------+
  11. | id | select_type | table | type | possible_keys | key  | key_len | ref  | rows    | Extra       |
  12. +----+-------------+-------+------+---------------+------+---------+------+---------+-------------+
  13. |  1 | SIMPLE      | cdrs  | ALL  | start,station | NULL | NULL    | NULL | 1859209 | Using where |
  14. +----+-------------+-------+------+---------------+------+---------+------+---------+-------------+
  15. 1 row in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement