> ###query the last time where ip='172.017.011.253'
> mysql> select max(THE_TIME) from COLL_DATA where
IP_ADDR='172.017.011.253';
> +---------------------+
> | max(THE_TIME) |
> +---------------------+
> | 2001-11-26 14:35:18 |
> +---------------------+
> 1 row in set (6.77 sec)
> ~~~~~~~~It's too slowly
Try storing the IP address as a numeric type, possibly decimal(10), and
using the functions INET_NTOA and INET_ATON to convert from the address back
and forth between dotted hexadecimal and decimal. This will help because
instead of searching for MySQL having to search a varchar(50) field, it can
search a numeric field, which of course is faster.
Ryan