Re: Slow query
mysql> explain SELECT locId, location.city as city,latitude,longitude FROM ip2isp join location on ip2isp.location=locId WHERE INET_ATON('x.x.x.x') BETWEEN start AND end\g
+----+-------------+----------+--------+-----------------------------------------------+-------------------+---------+---------------------------------+--------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+----------+--------+-----------------------------------------------+-------------------+---------+---------------------------------+--------+--------------------------+
| 1 | SIMPLE | ip2isp | range | start,end,idx_start_end_loc,idx_loc_start_end | idx_start_end_loc | 4 | NULL | 685619 | Using where; Using index |
| 1 | SIMPLE | location | eq_ref | PRIMARY | PRIMARY | 4 | transfer_ro_pre.ip2isp.location | 1 | Using where |
+----+-------------+----------+--------+-----------------------------------------------+-------------------+---------+---------------------------------+--------+--------------------------+
2 rows in set (0.02 sec)
mysql>
This is my result.
Now it looks good. Thanks you very much.
Edited 4 time(s). Last edit at 02/14/2011 10:04AM by Dragos Gabriel Iancu.
Subject
Views
Written By
Posted
3256
February 11, 2011 08:55AM
1029
February 12, 2011 03:32PM
1189
February 14, 2011 07:55AM
973
February 14, 2011 08:12AM
Re: Slow query
853
February 14, 2011 09:59AM
748
February 14, 2011 10:57AM
779
February 14, 2011 06:51PM
991
February 15, 2011 03:21AM
1184
February 15, 2011 11:17AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.