pt-archiver 关联表做归档
--charset=utf8 指定字符集防止中文乱码
and exists (select 1 from guest where guest.trip_no=test.trip_no and guest.biz_id=test.biz_id) 关联其他表进行归档
pt-archiver --source h= 127.0.0.1,P=3306,D=test,t=test,u=test,p=test --dest h= 127.0.0.1,P=3306,D=test,t=test_202104,u=test,p=test --charset=utf8 --share-lock --sleep=1 --progress 1000 --limit 1000 --txn-size 1000 --where "recv_time<'2021-04-06 00:00:00' and exists (select 1 from guest where guest.trip_no=test.trip_no and guest.biz_id=test.biz_id)"