一则清理MySQL大表以释放磁盘空间的案例 一.基本情况: 1.dbtest库554G,先清理st_online_time_away_ds(37G)表的数据,保留半年的数据: 1)删除的数据:select count(1),tdate from dbtest.st_online_time_away_ds where tdate < '2017-08-01';(记录数为:462171894) 2)保留的数据:select count(1),tdate from dbtest.st_online_t
oracle删除日志文件 删除日志文件的语法例如以下: alter database drop logfile member logfile_name; 删除日志文件须要注意例如以下几点: 1.该日志文件所在的的日志文件组不能处于current状态,须要运行一次手动日志切换,将该日志文件组的状态改动为inactive 2.该日志文件所在的日志文件组中必须包括有其它的日志成员. 3假设数据库执行在归档模式下,则应该在删除日志文件之前,确定它所在的日志文件组已经被归档,否则会导致数据丢失. 日志文件
find 命令删除日志文件 find ./my_dir -mtime +10 -type f -delete EXPLANATIONS ./my_dir your directory (replace with your own) -mtime +10 older than 10 days -type f only files -delete no surprise. Remove it to test your find filter before executing the whole co