List:General Discussion« Previous MessageNext Message »
From:Asad Habib Date:February 2 2006 4:43pm
Subject:Re: Fastest way to log IP's
View as plain text  
Storing the IP addresses as integers requires less memory but incurrs the 
cost of a call to these functions for every IP address. If you are going 
to use these addresses in string comparisons it's best to store them as 
varchars.

- Asad



On Thu, 2 Feb 2006, Brian Dunning wrote:

> I'm logging IP addresses and also searching for existing ones. Does anyone 
> happen to know which is more resource intensive: storing the IP's as integers 
> using INET_NTOA() and INET_ATON() to convert them at each query; or simply 
> storing the IP as a varchar? In each case the IP field would be the primary 
> key.
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
Thread
Fastest way to log IP'sBrian Dunning2 Feb
  • Re: Fastest way to log IP'sSGreen2 Feb
  • Re: Fastest way to log IP'sAsad Habib2 Feb
  • Re: Fastest way to log IP'sJay Paulson2 Feb
  • RE: Fastest way to log IP'sDaevid Vincent7 Feb