SQL Server:恢复模型对 TempDB 的影响

发布于 2024-08-19 09:40:01 字数 178 浏览 4 评论 0原文

数据库的恢复模式是否会影响 tempdb.mdf 的大小?

我们有一个涉及大量处理和批量插入的数据库。我们遇到了 tempdb 文件变得非常大(超过 70 GB)的问题。有问题的数据库设置为完全恢复。将其更改为简单恢复(在包含所有事务而不是 tempdb 的数据库上)是否会阻止它在这些大型插入和批量加载上使用 tempdb?

Does the recovery model of a database effect the size of the tempdb.mdf?

We have a database which involves a lot of processing and bulk inserts. We are having problems with the tempdb file growing to extremely large sizes (over 70 gb). The database in question is set to Full Recovery. Will changing it to Simple Recovery(on the database with all the transactions not the tempdb) prevent it from using the tempdb on these large inserts and bulk loads?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦萦几度 2024-08-26 09:40:01

数据库的恢复模式不影响其对tempdb的使用。 tempdb 的使用很可能来自“处理”部分:静态游标、临时表和表变量、排序操作和其他工作表支持的查询运算符、大型变量和参数。

批量插入部分(即受恢复模式影响的部分)没有 tempdb 影响。

The recovery mode of the database doesn't affect its use of tempdb. The tempdb usage is most likely from the 'processing' part: static cursors, temp tables and table variables, sort operations and other worktable backed query operators, large variables and parameters.

The bulk insert part (ie. the part which would be affected by the recovery mode) has no tempdb impact.

节枝 2024-08-26 09:40:01

tempdb 大小和放置建议

为了实现最佳 tempdb 性能,我们建议在生产环境中对 tempdb 进行以下配置:

将 tempdb 的恢复模式设置为 SIMPLE。该模型自动回收日志空间以保持较小的空间需求。

http://msdn.microsoft.com/en-us/library/ms175527.aspx

tempdb Size and Placement Recommendations

To achieve optimal tempdb performance, we recommend the following configuration for tempdb in a production environment:

Set the recovery model of tempdb to SIMPLE. This model automatically reclaims log space to keep space requirements small.

http://msdn.microsoft.com/en-us/library/ms175527.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文