@tsteur opened this Pull Request on May 27th 2021 Member


see https://stackoverflow.com/questions/23193761/delete-operation-locks-whole-table-in-innodb/23194154

Deletes may be faster or less locking when they are in descending order. Also added a transaction uncommitted in the hope for this to be less locking and making it faster. This should be fine because we usually delete only older visits anyway and they wouldn't be included in current reports or something.

Problem was that we noticed some locks around the time when the delete visits statement ran even though InnoDB was used.


  • [ ] Functional review done
  • [ ] Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • [ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • [ ] Security review done see checklist
  • [ ] Code review done
  • [ ] Tests were added if useful/possible
  • [ ] Reviewed for breaking changes
  • [ ] Developer changelog updated if needed
  • [ ] Documentation added if needed
  • [ ] Existing documentation updated if needed
This Pull Request was closed on May 30th 2021
Powered by GitHub Issue Mirror