调整填充因子以减少碎片
我有一个非聚集索引,约有 1000 页、95% 的碎片和 FillFactor 为“0”。
我在周日重建了索引。一周后,该索引再次出现 95%(左右)的碎片。这是否表明我需要将 FillFactor 更改为 80-90%?
我是否应该每周调整填充因子,看看是否可以每周减少碎片?我的拍摄是否有一个目标水平?
谢谢。
I have an non-clustered index that has ~1000 pages, 95% fragmentation and a FillFactor of '0'.
I rebuilt the index on Sunday. A week later, the index has 95% (or so) fragmentation again. Is this an indication that I need to change the FillFactor to say 80-90%?
Should I be tweaking the fill factor each week to see if I can reduce the fragmentation from week to week? Is there a target level I shoot be shooting for?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我肯定会考虑调整你的填充因子。如果它的碎片很快,我猜它是一个写入密集型索引,它可以从填充因子中获得显着的性能优势。
不过,确定最佳填充因子在很大程度上是一个反复试验的过程,与其说是一门科学,不如说是一门艺术。来自 Brad McGehee 的重建索引技巧:
I would consider tweaking your fill factor for sure. If it's fragmenting quickly, I'm guessing it's a write-heavy index, which can gain substantial performance benefits from a fill factor.
Determing optimal fill factors is pretty much a trial-and-error process though, and more of an art than a science. From Tips for Rebuilding Indexes by Brad McGehee: