cancel
Showing results for 
Search instead for 
Did you mean: 

Safe log tables to clean

Safe log tables to clean

Hi everybody!

I've Magento CE 1.9.0.1 with all the patches.

I've tried to set the log clean, but despite the cron works correctly, the tables in the db are not being cleaned.

So I want to clean the tables manually, as I haven't found another solution.

 

Then, I just want to ask you: which log table can I truncate without consequences on Magento?

 

I read something  on internet, but I found too much differents opinions, so I've not a clear idea of which table I have to clean.

 

Thanks in advance to all,

Arianna

Tags (1)
2 REPLIES

Re: Safe log tables to clean

Re: Safe log tables to clean

Look into Magento /shell folder. There's a tool log.php. I'll paste it's usage status here:

Usage:  php -f log.php -- [options]
        php -f log.php -- clean --days 1

  clean             Clean Logs
  --days <days>     Save log, days. (Minimum 1 day, if defined - ignoring system value)
  status            Display statistics per log tables
  help              This help

And here what its status looks like:

-----------------------------------+------------+------------+------------+
Table Name                         | Rows       | Data Size  | Index Size |
-----------------------------------+------------+------------+------------+
log_customer                       | 0          | 16.38Kb    | 16.38Kb    |
log_visitor                        | 246.92K    | 22.09Mb    | 0 b        |
log_visitor_info                   | 257.68K    | 47.79Mb    | 0 b        |
log_url                            | 0          | 16.38Kb    | 32.77Kb    |
log_url_info                       | 0          | 16.38Kb    | 0 b        |
log_quote                          | 1.49K      | 81.92Kb    | 0 b        |
report_viewed_product_index        | 89.77K     | 4.60Mb     | 14.89Mb    |
report_compared_product_index      | 11         | 16.38Kb    | 81.92Kb    |
report_event                       | 106.05K    | 6.57Mb     | 15.73Mb    |
catalog_compare_item               | 2          | 16.38Kb    | 81.92Kb    |
-----------------------------------+------------+------------+------------+
Total                              | 701.92K    | 81.22Mb    | 30.83Mb    |
-----------------------------------+------------+------------+------------+
Tanel Raja