Skip to content

Commit

Permalink
br: add faq - why oom when restore stats (pingcap#16847)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leavrth authored Mar 18, 2024
1 parent 8e4d9b4 commit 286f7ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions faq/backup-and-restore-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,9 @@ BR v4.0.9 备份统计信息使 br 工具消耗过多内存,为保证备份过
### 恢复完成后,可以再针对某张表删除后重新恢复吗?
删除某张特定的表后可以再重新进行恢复,但删除时需要使用 `DROP TABLE``TRUNCATE TABLE` 语句,不能使用 `DELETE FROM` 语句。因为 `DELETE FROM` 只是通过更新 MVCC 版本标记要删除的数据,这些数据直到 GC 后才会被真正删除。
### 恢复统计信息时为什么会占用大量内存?
在 v7.6.0 之前,BR 备份的统计信息数据会与库表信息存放到一起,在恢复的时候加载到内存中。因此,当备份的统计信息数据非常大时,BR 就需要占用大量的内存。
从 v7.6.0 开始,备份的统计信息会单独存放在特定的文件中,当需要恢复某张表的统计信息时,才会加载对应表的统计信息到内存中来,从而可以节省内存空间。

0 comments on commit 286f7ef

Please sign in to comment.