摘要:
日志数据往往都非常的大,查询起来非常的慢,可进行分表。一种方式是在记录日志时进行按月分表,另一种是使用定时任务把前面的数据按月分表。本文介绍第二种方式(只展示关键代码): public void backupSystemLog() { log.info("开始进行日志备份..."); long st 阅读全文
摘要:
表结构相同,分表后如何查询所有表的数据?可以使用union关键字 select * from table1 where type=1 union select * from table1 where type=1 union select * from table3 where type=1 uni 阅读全文