数据库中清空log日志

来源:互联网 发布:p相片软件 编辑:程序博客网 时间:2024/05/16 18:05

SET FOREIGN_KEY_CHECKS=0;

TRUNCATE `log_customer`;

TRUNCATE `log_visitor`;

TRUNCATE `log_visitor_info`;

TRUNCATE `log_visitor_online`;

TRUNCATE `log_quote`;

TRUNCATE `log_summary`;

TRUNCATE `log_summary_type`;

TRUNCATE `log_url`;

TRUNCATE `log_url_info`;

TRUNCATE `sendfriend_log`;

TRUNCATE `report_event`;

TRUNCATE `dataflow_batch_import`;

TRUNCATE `dataflow_batch_export`;

TRUNCATE `index_process_event`;

TRUNCATE `index_event`;

TRUNCATE `report_viewed_product_index`;

TRUNCATE `report_compared_product_index`;

TRUNCATE `catalog_compare_item`;

ALTER TABLE `log_customer` AUTO_INCREMENT=1;

ALTER TABLE `log_visitor` AUTO_INCREMENT=1;

ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;

ALTER TABLE `log_visitor_online` AUTO_INCREMENT=1;

ALTER TABLE `log_quote` AUTO_INCREMENT=1;

ALTER TABLE `log_summary` AUTO_INCREMENT=1;

ALTER TABLE `log_url_info` AUTO_INCREMENT=1;

ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;

ALTER TABLE `report_event` AUTO_INCREMENT=1;

ALTER TABLE `dataflow_batch_import` AUTO_INCREMENT=1;

ALTER TABLE `dataflow_batch_export` AUTO_INCREMENT=1;

ALTER TABLE `index_event` AUTO_INCREMENT=1;

ALTER TABLE `report_viewed_product_index` AUTO_INCREMENT=1;

ALTER TABLE `report_compared_product_index` AUTO_INCREMENT=1;

ALTER TABLE `catalog_compare_item` AUTO_INCREMENT=1;

--

-- Enterprise Edition Begins

--

TRUNCATE `enterprise_logging_event`;

TRUNCATE `enterprise_logging_event_changes`;

ALTER TABLE `enterprise_logging_event` AUTO_INCREMENT=1;

ALTER TABLE `enterprise_logging_event_changes` AUTO_INCREMENT=1;

--

-- Enterprise Edition Ends

--

SET FOREIGN_KEY_CHECKS=1;

0 0
原创粉丝点击