RE: Fastest way to log IP's

2006-02-07 Thread Daevid Vincent
IL PROTECTED] > Sent: Thursday, February 02, 2006 8:21 AM > To: mysql@lists.mysql.com > Subject: Fastest way to log IP's > > I'm logging IP addresses and also searching for existing ones. Does > anyone happen to know which is more resource intensive: storing the > I

Re: Fastest way to log IP's

2006-02-02 Thread Jay Paulson
> 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

Re: Fastest way to log IP's

2006-02-02 Thread Asad Habib
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 I

Re: Fastest way to log IP's

2006-02-02 Thread SGreen
Brian Dunning <[EMAIL PROTECTED]> wrote on 02/02/2006 11:21:25 AM: > 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

Fastest way to log IP's

2006-02-02 Thread Brian Dunning
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