我机器是普通的IBM,2G,现在数据5000万了,一个表,现在想清除点数据,就是太慢了,基本都不相应,有什么好的方法有时间字段(字符型12位),如200704081200
上面建了索引,
可以用该字段确定删除范围
delete from 表 where in_date>'200704080000' and in_date<'200704090000'
表示删除一天的数据,数据量一般6万,
其他没有字段来判断了1、删除数据是否使用到日志?
2、产生的日志在那里,如果能删除结束,是否会自动清除

解决方案 »

  1.   

    select 1=1,1='1', '1.0'=1, '1'='1.0', '01' = ' 1', '01' = '  1 ', 1='01 ', '1 '=1, '1.'=1, 1.00=1.0, '1.00'='1.0';What's the result in MYSQL? If using Oracle, add "from dual" at the end.DO YOU KNOW BEFORE RUNNING IT?
      

  2.   

    delete是很慢的它会占用回滚段,而且即使删除后high water  不会回退,同样还是很慢的,如果你的表是分区表的话,可以用truncate。对数据库的操作应该是记录日志的。