Last Updated: February 25, 2016
·
3.66K
· av4tar

rotating tables in mysql

Want to rotate a table used for log data? Don't delete records (that will suck) just rename it:

create table new_logtable like logtable;
rename table logtable to logtable_20121127, new_logtable to logtable;