-
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store refs and sizes in their own tables, no longer store full User-A…
…gent string hits.ref and hits.ref_scheme are now in their own refs table; there was a lot of duplication here, and this saves quite a bit of space. For example on goatcounter.com one site has 79 million pageviews with the same 10-byte string set as the ref. Add up the ref_scheme and it's over 800M of the same string repeated over and over again. Never mind all the really common strings like "Google", "www.facebook.com" and whatnot shared between all the different sites. This also makes it easier to update the refs grouping; for example I have "yandex.ru/clck/jsredir", "yandex.ru", and a few variants, but these should all just be "Yandex". Updating that right now is hard because it has to rewrite so much in the (large) hits table. The same applies to sizes; especially with the scaling these could be quite long strings. All of this saves quite a bit of size; for example for arp242.net: before after total db size 224M 112M hits 90M 9M ref_counts 38M 29M user_agents 12M - refs - 0.5M sizes - 0.3M --- Store browser_id and system_id on the hits column, and no longer store the User-Agent header. It was never really needed, and only done so I could correct information later if it turned out there was as a bug in the parser I wrote, but this has never been needed because it was pretty much right from the get-go. Directly storing this on hits also simplifies a few queries.
- Loading branch information
Showing
37 changed files
with
783 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.