4 ms·
Yeah, while this is not optimal (ip should be converted into integer, time should be ts), the table would be small (as old entries could be safely deleted). The
by jerjerjer 5y ago
Yeah, while this is not optimal (ip should be converted into integer, time should be ts), the table would be small (as old entries could be safely deleted). The only real issue is the lack of indices.
Also is helo field even needed?
- mjevans 5y agoYes. A proper mail implementation won't randomize it, so it should be consistent. Depending on the design of the validation stages it might only need a case-normalized lookup to the string index table and that id as part of the final multi-column unique index, and in that last case only to convey to the database the expectations to optimize around (and require the data adhere to).
- ttfkam 5y agoIP should NOT be an integer. IPv6 does not fit in a database integer. MySQL has functions to convert to bytes. Even better, use a database with a proper inet datatype. That way you get correctness, space efficiency, and ability to intelligently index.
- _3u10 5y agoIn 2002 it definitely should have been an integer. In 2021 I’d recommend just turning off the IPv6 allocation or deleting it from DNS like this site does.
- miyuru 5y ago> In 2021 I’d recommend just turning off the IPv6 allocation or deleting it from DNS like this site does. This is the funniest IPv6 excuse I've heard on HN. https://ipv6excuses.com/ https://ipv6excuses.com/
- _3u10 5y agoThanks! I was really surprised to find it myself. I used HN in some sample code for analyzing how SSL tickets are reused and was surprised to see an IPv4 address come back.