我现在的方法比较耗时,因前面数据id连续递增,到跳的id时不停增加id值以及对比此id创建日期,这样推断有无空的id,然后在查询起始和结束id不超过一定范围,比如5亿条数据量以内作为一次导出。
select count(id) from xxx where id > 5730055060275318 and id <= 5730055600000000
460307296
select created_time from xx where id = 5730055060275318;
2022-07-19 04:50:39
select created_time from produce_param where id = 5730055600000000;
2022-07-21 06:58:31