#Optimizing tables OPTIMIZE TABLE tablen_name; #Emptying tables TRUNCATE table_name; #Note to self: # # Add -B option for backup or -D option for dump database to file, setup like mdz # mysqldump --opt --skip-lock-tables -u'username' -p'password' -h'host' 'database_name' | pv -N DatabaseDump | (gzip || pigz) -c | pv -N Compression | > dumpfile.gz # COMMUNITY dataflow_batch_import dataflow_batch_export 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 index_event catalog_compare_item # Additional # suggested here: http://www.techawaken.com/clean-magento-database-logs-faster-performance/ index_process_event sendfriend_log # ENTERPRISE # suggested here: http://www.techawaken.com/clean-magento-database-logs-faster-performance/ enterprise_logging_event enterprise_logging_event_changes # Brian Nelson core_cache core_cache_option core_cache_tag core_session index_process_event ## pull set of values from the schema tables for a list of tables SELECT table_name,table_rows,data_length,index_length FROM information_schema.tables WHERE table_name LIKE '%config%' AND table_schema IN('database_name'); SELECT table_name,table_rows,data_length+index_length AS 'Data' FROM information_schema.tables WHERE table_name RLIKE "table1|table2|table3" AND table_schema IN('datbase_name');