Endless number of tables

I have noticed data is gathered per month in seperate tables, for each new month a new table. Is it common that Matomo creates an ever growing list of tables? Can this lead to database problems longterm? OK, I just found MySQL supports up to 4.000.000.000 tables so that won’t be the issue in my lifetime, but will data be summarized at one point?

I found that tables were created for 2017-2025 too, even though I only started using Matomo a while ago.. What is up with those tables?

Hey, yeah I’ve actually seen this kind of thing before with analytics setups, so I get why it looks a bit scary at first :sweat_smile:

What you’re seeing is basically how Matomo structures data — it often splits stats into monthly tables (archive style), so over time it feels like “endless tables” even if the data size isn’t crazy.

I faced something similar when I set up Matomo for a client project, and I also thought the DB was exploding. But in reality it’s more about segmentation than actual bloat.

What helped me understand/handle it:

  • Those old year tables (like 2017–2025) can exist as “pre-created archive structure”, not necessarily active data

  • Make sure archiving is enabled properly, otherwise it keeps generating on demand

  • Run occasional DB optimization / check Matomo archive settings so it doesn’t keep unnecessary temp growth

Not sure if it helps, but I stopped worrying once I realized Matomo is designed like this, not broken :grinning_face_with_smiling_eyes: