Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试轮换具有大量事务的 innoDB 表,因此我需要锁定所有涉及的表。
锁定表后,我无法使用 RENAME 使用辅助表来移动数据。
如果我进行 INSERT,那么我必须担心 id 的完整性。
有什么建议么?这甚至可能吗
您可以在日志中进行轮换吗?有 7 个表 - 一周中的每一天 - 并让您的查询将当天考虑在内,或者更好的是,用存储过程包装插入。每小时轮换 24 张桌子、每月轮换 12 张桌子等也是如此。