Huge RequestStats
  • Table RequestStats is quite big in my old site (campsite 3.3.3)
    and I would like to know if is it safe do deleta all data which is older than 2014-01-01
    to speed up backup proces.

    Size of table 
    RequestStats on disc:

    # du -sh RequestStats*
    12K    RequestStats.frm
    506M    RequestStats.MYD
    1.8G    RequestStats.MYI

    No of all records:

    mysql> select count(*) from RequestStats;
    +----------+
    | count(*) |
    +----------+
    | 33093293 |
    +----------+
    1 row in set (0.00 sec)

    No of all year 2014 records:

    mysql> select count(*) from RequestStats where date >= "2014-01-01";
    +----------+
    | count(*) |
    +----------+
    |  1376478 |
    +----------+
    1 row in set (24.96 sec)

    Thanks
    Robert


  • 2 Comments sorted by
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    you can keep data only for last three months
  • Andrej
    thanks!