Skip to content

core:purge-old-archive-data optimizes all tables twice #20692

@Starker3

Description

@Starker3

When using the ./console core:purge-old-archive-data all command it seems as though all tables are optimized at least twice. For example:

Optimizing table matomo_archive_numeric_2021_04...Done. [Time elapsed: 19.973s]
Optimizing table matomo_archive_blob_2021_04...Done. [Time elapsed: 613.340s]
...
Optimizing table matomo_archive_numeric_2021_04...Done. [Time elapsed: 25.603s]
Optimizing table matomo_archive_blob_2021_04...Done. [Time elapsed: 747.595s]

For those running this command on a large Matomo database means that it takes almost double the amount of time (Which can be considerable). In one specific users case it means that the command takes 12 hours to complete which would be several hours less if it wasn't executed twice.

This behaviour does not seem to occur when running the command without the all dates option, a specific date or when omitting the date option altogether (So that only the current month is purged and optimized)

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions