Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix console command parameters documentation for optimizing the database #19851

Open
heurteph-ei opened this issue Oct 12, 2022 · 3 comments
Open
Labels
c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base.

Comments

@heurteph-ei
Copy link

Documentation URL

https://matomo.org/faq/on-premise/managing-your-databases-size/#purging-and-optimizing-the-database-using-a-console-command

Citation

To reduce execution time, you can select specific date periods to run these scripts for. This means that you can target just the recent > months, for which report data is likely to have changed. Note that data for annual reports is stored in the archives for January of the > appropriate year, so it is a good idea to optimize these regularly as well, e.g.

./console database:optimize-archive-tables last2
./console database:optimize-archive-tables january

We recommend to set up above two commands as a cronjob and have them executed once monthly.

##Problem

(Last 2 what? Days, weeks, months, years? Which January? Why only 2 examples? etc.)

But after some trial & error, I figured out at least some of the format:

./console database:optimize-archive-tables 2020
./console database:optimize-archive-tables january-2020
./console database:optimize-archive-tables october-2022

Still a little confusing, because everything else in Matomo uses the YYYY-MM-DD (or at least YYYY-MM) format, but at least it’s something! Not sure why they did it that way, it might be that the tool is only supposed to be used for months or something, not sure.

Source

https://forum.matomo.org/t/what-is-the-best-way-to-purge-old-data-if-it-has-never-been-run-in-12-years/38721

More

Maybe the date format could also be consistent on the whole Matomo API/functions (then another technical issue should be created, I let Matomo team decide...)

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/what-is-the-best-way-to-purge-old-data-if-it-has-never-been-run-in-12-years/38721/3

@heurteph-ei heurteph-ei changed the title Fix console command parameters for optimizing the database Fix console command parameters documentation for optimizing the database Oct 12, 2022
@sgiehl sgiehl added the c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base. label Oct 13, 2022
@sgiehl
Copy link
Member

sgiehl commented Oct 13, 2022

@justinvelluppillai how shall we handle such documentation related issues? Shall we directly have a look at those and fix it if possible, or maybe forward them to support/website team, so they can have a look? Putting them into prioritization queue doesn't sound useful though.

@justinvelluppillai
Copy link
Contributor

@sgiehl if it's simple enough to add examples or otherwise fix then you can provide improvements directly otherwise they would go through normal prioritisation via the backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base.
Projects
None yet
Development

No branches or pull requests

5 participants