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.
我有一个MySQL表有5000万行数据的要求。我想备份上个月的数据并想插入一个新表。备份成功后,需要截断那么多数据。每一秒我正在从设备获取数据包并插入此表。因此,在进行备份之前需要考虑加载所有内容。这样做的有效方法是什么。
重置计数器并清理桌子
TRUNCATE TABLE "table_name";