Comments (5)
This is in the 2.5 release.
from goatcounter.
This sounds about right; you can usually vacuum
things to reclaim some space, but probably not too much.
This is the trade-off you get with SQL: the upshot is that it's easy to run and "standard", and that people don't need to spend a lot of time managing specialized databases, but the downside is that it's not the most optimum format, and you end up duplicating some things, which results in more disk space being used. Usually it's not a problem, although at scale it does add up (goatcounter.com is approaching 250G).
That said, I did spend some time optimizing all of this, and it reduced the database for stats.arp242.net by about half (the exact savings will depend on a few factors); stats.arp242.net is already running well on that, I just need to migrate goatcounter.com which I haven't gotten around to.
from goatcounter.
Thanks for confirming. The numbers I report are after vacuum
-ing.
Are your optimizations in the source code of GoatCounter or somewhere else? Would this need a database migration to preserve all historic stats?
from goatcounter.
It's mostly just an optimisation of the database schema to avoid duplication – you do need to run a fairly expensive migration which rewrites quite a bit, but of course all data will be retained.
It's this branch: https://github.com/arp242/goatcounter/tree/refs – see the latest commit on that (I make NO guarantees on the stability of that branch, I don't recommend running it).
from goatcounter.
That's great to know. I'll keep an eye on upcoming releases to see when this change makes it. It's not urgent right now, but would be nice to keep the DB size a bit smaller if possible. The ~half reduction you mention sounds very good.
from goatcounter.
Related Issues (20)
- failed to migrate 2022-11-15-1-correct-hit-stats HOT 7
- Thousands separator setting doesn't seem to save HOT 3
- Chrome - /count is no longer considered an image HOT 3
- ERROR when setting up my page HOT 1
- API for per-day stats HOT 1
- navigator.sendBeacon can fail, should be handled HOT 1
- Cannot Self Host Locally HOT 4
- Unable to delete site HOT 4
- utm_campaign and campaign seem to not work HOT 1
- Disabling Sessions breaks GoatCounter HOT 4
- Someone else can send traffic from their website HOT 4
- Sending events from a backend HOT 2
- Enable use of subpath rather than domains for sites HOT 2
- everything is Loading forever
- API returns unreliable number of records when using unknown query parameters HOT 7
- "campaigns" - How to? HOT 1
- GoatCounter CSV exports – what are your use cases? HOT 8
- function "is_inf" not defined HOT 2
- Delete site shows data after adding it back HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goatcounter.