Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Logging every hit will always require a lot of space. But there are some tricks you can use to "compress" it: hash long strings like the URL and user agent and store the hash as binary instead of a string. A 100+ byte string can compress to just 16 or 32 bytes depending the hash your pick. Store the hash lookup in a separate table.


what is the benefit of your approach? The lookup table will still have data growth issues


Presumably there will be many more hits than URLs, i.e. the URL table will grow much slower than the Hits table.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: