PDA

View Full Version : What MySQL datatype do you guys use for storing IP addresses?


mgomez03
05-25-2006, 06:02 AM
Some go the varchar(15) route while others the INET_ATON/INET_NTOA way. Someone mentioned to me that while the latter saves more disk space than the former, it also consumes more CPU. I've got shared hosting where you end up in the doghouse for over-consuming resources, but not really sure if the space saved outweighes the cpu factor?

tg
05-25-2006, 04:52 PM
what cost more to upgrade, cpu or harddrive?

disk space is supper cheap! dont worry about takin up an extra byte or two. oh hell for that matter dont worry about takin up an extra mb or two.