3 ms·
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
by daigoba66 12y ago
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.
- mandeepj 12y agowhat is the benefit of your approach? The lookup table will still have data growth issues
- tonyarkles 12y agoPresumably there will be many more hits than URLs, i.e. the URL table will grow much slower than the Hits table.