News for hackers. Stuff that matters.
Re:A terrible schema from a clueless programmer by hoppla on Sunday November 07, 2021 @12:05PM (#29141218)
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…
Re:A terrible schema from a clueless programmer by mewpmewp2 on Sunday November 07, 2021 @06:22PM (#29144565)
Is 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?
Re:A terrible schema from a clueless programmer by hoppla on Wednesday November 10, 2021 @01:52PM (#29178740)
The 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.