Most efficient way to store IP Address in MySQL

Posted by ensnare on Stack Overflow See other posts from Stack Overflow or by ensnare
Published on 2010-03-29T23:52:19Z Indexed on 2010/03/29 23:53 UTC
Read the original article Hit count: 446

Filed under:
|
|

What is the fastest way to store and retrieve IP addresses in MySQL? Right now I'm doing:

SELECT * FROM logins WHERE ip = '1.2.3.4'

Where ip is a VARCHAR(15) field.

Is there a better way to do this? I'm using Python.

Thanks.

© Stack Overflow or respective owner

Related posts about python

Related posts about beginner