6 ms·
I usually store IPv4 as unsigned int, and IPv6 as two 64 bit unsigned ints. But supporting both variants require that I have an a table for each type and a glue
by hoppla 5y ago
I usually store IPv4 as unsigned int, and IPv6 as two 64 bit unsigned ints. But supporting both variants require that I have an a table for each type and a glue table to reference the record in the correct table. Storing simple stuff quickly turns complicated…
- mewpmewp2 5y agoIs there much point in optimising this as opposed to keeping it in strings, at what QPS do you think it would matter and how much?
- hoppla 5y agoThe main reason to store it as numbers is because I select records based on what subnet an IP address is in. I can only do this when I use integers.