@simpleuser99 opened this Issue on December 18th 2018

Hello.
My motomo version 3.3.0 and PHP 7.1.24
My matomo mysql db size is 400GB. I want clear a part of my db. I need delete 2015 year and part of 2016.
I go to console and do next command:
./console core:delete-logs-data --dates=2016-02-01,2016-02-31

and view next result:

Preparing to delete all visits belonging to ALL websites between 2015-01-01 00:00:00 and 2016-03-02 00:00:00.
You are about to delete log data. This action cannot be undone, are you sure you want to continue? (Y/N) y
.......................................................................................................................
Successfully deleted 168381 visits. Time elapsed: 899.281s

But my bd do no reduce size.

If I repeat
./console core:delete-logs-data --dates=2016-02-01,2016-02-31
I view

Preparing to delete all visits belonging to ALL websites between 2015-01-01 00:00:00 and 2016-03-02 00:00:00.
You are about to delete log data. This action cannot be undone, are you sure you want to continue? (Y/N) y
Successfully deleted 0 visits. Time elapsed: 487.321s

Why? How can I purge my db?

P.S. When delete process is working, I start strace and view next:

sendto(5, "w\t\0\0\3DELETE FROM `piwik_log_conv"..., 2427, MSG_DONTWAIT, NULL, 0) = 2427
etc

@fdellwing commented on December 18th 2018 Contributor

How do you check the DB size?

@tsteur commented on December 18th 2018 Member

You may need to run optimize table (can take a long time on big size). This is not quite a Matomo related question but MySQL. I recommend you ask in our forum: https://forum.matomo.org or search for something like "mysql reduce disk space after deleting data" or "mysql reclaim disk space"

@fdellwing commented on December 18th 2018 Contributor

I guess you run into this problem: https://forum.matomo.org/t/matomo-using-way-more-disk-space-then-reported/30061/2

If you wanna fix the numbers, run optimize, but you don't need to, because the size already shrunk.

This Issue was closed on December 18th 2018
Powered by GitHub Issue Mirror