{"id":235,"date":"2016-06-06T15:21:17","date_gmt":"2016-06-06T15:21:17","guid":{"rendered":"http:\/\/www.evermoretechnologies.com\/blog\/?p=235"},"modified":"2016-06-09T04:43:00","modified_gmt":"2016-06-09T04:43:00","slug":"truncating-magento-log-tables","status":"publish","type":"post","link":"https:\/\/www.evermoretechnologies.com\/blog\/2016\/06\/truncating-magento-log-tables\/","title":{"rendered":"Truncating Magento Log Tables"},"content":{"rendered":"<p>Log cleaning in Magento is great, and they even provide a shell script for cleaning log tables.  But sometimes I just want to do it the fast way through the MySQL cli.  To do that I run this script.<\/p>\n<p>[sql]TRUNCATE TABLE dataflow_batch_export;<br \/>\nTRUNCATE TABLE dataflow_batch_import;<br \/>\nTRUNCATE TABLE log_customer;<br \/>\nTRUNCATE TABLE log_quote;<br \/>\nTRUNCATE TABLE log_summary;<br \/>\nTRUNCATE TABLE log_summary_type;<br \/>\nTRUNCATE TABLE log_url;<br \/>\nTRUNCATE TABLE log_url_info;<br \/>\nTRUNCATE TABLE log_visitor;<br \/>\nTRUNCATE TABLE log_visitor_info;<br \/>\nTRUNCATE TABLE log_visitor_online;<br \/>\nTRUNCATE TABLE report_viewed_product_index;<br \/>\nTRUNCATE TABLE report_compared_product_index;<br \/>\nTRUNCATE TABLE report_event;[\/sql]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Log cleaning in Magento is great, and they even provide a shell script for cleaning log tables. But sometimes I just want to do it the fast way through the MySQL cli. To do that I run this script. [sql]TRUNCATE TABLE dataflow_batch_export; TRUNCATE TABLE dataflow_batch_import; TRUNCATE TABLE log_customer; TRUNCATE TABLE log_quote; TRUNCATE TABLE log_summary; TRUNCATE&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[23],"tags":[],"class_list":["post-235","post","type-post","status-publish","format-standard","hentry","category-manual-sql-use-with-caution"],"_links":{"self":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":2,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"predecessor-version":[{"id":238,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/235\/revisions\/238"}],"wp:attachment":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}