Clearing Magento Log Data

前端 未结 15 603
粉色の甜心
粉色の甜心 2020-12-07 08:31

I have a question regarding clearing of the log data in Magento.

I have more than 2.3GB of data in Magento 1.4.1, and now I want to optimize the database, because it

相关标签:
15条回答
  • 2020-12-07 09:10

    Try:

    TRUNCATE dataflow_batch_export;
    TRUNCATE dataflow_batch_import;
    TRUNCATE log_customer;
    TRUNCATE log_quote;
    TRUNCATE log_summary;
    TRUNCATE log_summary_type;
    TRUNCATE log_url;
    TRUNCATE log_url_info;
    TRUNCATE log_visitor;
    TRUNCATE log_visitor_info;
    TRUNCATE log_visitor_online;
    TRUNCATE report_viewed_product_index;
    TRUNCATE report_compared_product_index;
    TRUNCATE report_event;
    TRUNCATE index_event;
    

    You can also refer to following tutorial:
    http://www.crucialwebhost.com/kb/article/log-cache-maintenance-script/

    Thanks

    0 讨论(0)
  • 2020-12-07 09:11

    Cleaning Logs via Magento Admin Panel

    This method is easier for non technical store owners who don’t want’ to mess directly with the Magento store’s database. To activate log cleaning option in Magento just do the following:

    Log on to your Magento Admin Panel. Go to System => Configuration. On the left under Advanced click on System (Advanced = > System). Under system you will see “Log Cleaning” option. Fill the desired “Log Cleaning” option values and click Save.

    Cleaning Logs via phpMyAdmin

    If you are comfortable with mysql and queries then this method is more efficient and quicker than default Magento Log Cleaning tool. This method also allows your to clean whatever you like, you can even clean tables which aren’t included in default Magento’s Log Cleaning tool.

    Open the database in phpMyAdmin In the right frame, click on the boxes for the following tables: dataflow_batch_export

    dataflow_batch_import

    log_customer

    log_quote

    log_summary

    log_summary_type

    log_url

    log_url_info

    log_visitor

    log_visitor_info

    log_visitor_online

    report_viewed_product_index

    report_compared_product_index

    report_event

    Look to the bottom of the page, then click the drop down box that says “with selected” and click empty. Click Yes on confirmation screen, and this will truncate all the selected tables.

    or you can use script to run

    TRUNCATE dataflow_batch_export;
    TRUNCATE dataflow_batch_import;
    TRUNCATE log_customer;
    TRUNCATE log_quote;
    TRUNCATE log_summary;
    TRUNCATE log_summary_type;
    TRUNCATE log_url;
    TRUNCATE log_url_info;
    TRUNCATE log_visitor;
    TRUNCATE log_visitor_info;
    TRUNCATE log_visitor_online;
    TRUNCATE report_viewed_product_index;
    TRUNCATE report_compared_product_index;
    TRUNCATE report_event;
    TRUNCATE index_event;
    

    Keep in mind that we are here to empty (Truncate) selected tables are not drop them. Be very careful when you do this.

    Performing this regularly will definitely improve your Magento store’s performance and efficiency. You can setup up scripts to do this automatically at regular intervals too using “CRON”.

    0 讨论(0)
  • 2020-12-07 09:13

    you can disable or set date and time for log setting.

    System > Configuration > Advanced > System > Log Cleaning

    0 讨论(0)
  • 2020-12-07 09:15

    Login to your c-panel goto phpmyadmin using SQL run below query to clear logs

    TRUNCATE dataflow_batch_export;
    TRUNCATE dataflow_batch_import;
    TRUNCATE log_customer;
    TRUNCATE log_quote;
    TRUNCATE log_summary;
    TRUNCATE log_summary_type;
    TRUNCATE log_url;
    TRUNCATE log_url_info;
    TRUNCATE log_visitor;
    TRUNCATE log_visitor_info;
    TRUNCATE log_visitor_online;
    TRUNCATE report_viewed_product_index;
    TRUNCATE report_compared_product_index;
    TRUNCATE report_event;
    TRUNCATE index_event;
    
    0 讨论(0)
  • 2020-12-07 09:16

    there are some other tables you can clear out: documented here : https://dx3webs.com/blog/house-keeping-for-your-magento-database

    hope this helps Andy

    0 讨论(0)
  • 2020-12-07 09:26

    This script is neat and tidy. Set it up as a cron job and relax:

    http://www.crucialwebhost.com/kb/magneto-log-and-cache-maintenance-script/

    0 讨论(0)
提交回复
热议问题