4 ms·
Your advice reads like a suggestion to suffer an actual problem today -- finding and sorting IPs without needing a UDF -- to prevent a possible future problem.
by encoderer 17y ago
Your advice reads like a suggestion to suffer an actual problem today -- finding and sorting IPs without needing a UDF -- to prevent a possible future problem.
I wrote a book in another comment above, so I agree that the list suffers from a lack of nuance. But I'd say calling this a "really bad idea" should just be replaced with saying "use some caution."
- kennu 17y agoMy advice was selfish. I run a personal server that is IPv6 connected, and sometimes web frameworks will break because the author tried to store e.g. REMOTE_ADDR in a VARCHAR(16) column. So I would like to promote the fact that IP address != 32 bits, and if you really want to optimize for IPv4 address lookup, your code needs to handle it as a separate, specialized case.