更改标识列的填充因子会影响合并复制吗?

Does changing fill factor on Identity column affect Merge Replication?

我在数据库中识别出多个标识列设置为 8090%。我希望将它们全部设置为 100%.

有谁知道使用 Merge Replication 更改标识列的填充因子是否会导致任何问题?

FillFactor 仅在通过使用 FillFactor 设置保留 space 自由设置的百分比重建索引时出现。

通过合并复制,两个源的更改都通过触发器进行跟踪并保持同步。

当您将 fillfactor 设置为 80% 时,space 的 20% 仍可用于您设置为 100% 的 inserts.If,您不会留下任何 space,那里你有可能出现页面拆分。Page splits are very expensive 就日志而言 growth.so 你的插入速度可能会变慢。

但是对于标识列,所有的值都会增加,因此它们将逻辑上添加到 page.So 的末尾设置值 0 或 100 应该改善 performance.But 填充因子仅影响你的叶级页面,如果你更新任何可能导致大小超过页面总长度的行怎么办......这是MSDN在这种情况下所说的

A nonzero fill factor other than 0 or 100 can be good for performance if the new data is evenly distributed throughout the table. However, if all the data is added to the end of the table, the empty space in the index pages will not be filled. For example, if the index key column is an IDENTITY column, the key for new rows is always increasing and the index rows are logically added to the end of the index. If existing rows will be updated with data that lengthens the size of the rows, use a fill factor of less than 100. The extra bytes on each page will help to minimize page splits caused by extra length in the rows.

设置一个好的 fillFactor 值取决于你的数据库是如何使用的..大量插入(应该有更多的自由和 fillfactor 值应该更少,但选择会有些昂贵)。更少的插入(将填充因子保留在一些高价值)

简单的搜索会产生很多 results。但您应该先测试它们并使其适应您的场景

FILLFACTOR主要用于索引。

由于您想将填充因子更改为 100.Its,这意味着您需要在合并表上删除并重新创建索引 Fillfactor 100。

并且如果在您的合并复制中,'Copy Clustered Index''Copy Non Clustered Index'TRUE 对于所有文章属性,一旦您在发布者上重新创建 Index,它也会在其他订阅者上得到复制。

因此,如果您有大量带有索引的合并表,我建议在下班时间实施它,因为创建索引需要时间才能在订阅者上进行复制。

您也可以通过这个查询来查看填充因子。是的,但正如@Ragesh 所说,每当我们更改填充因子(复制)时都会影响性能。

Fill Factor is directly related to Indexes. Every time we all here the word ‘Index,’ we directly relate it to performance. Index enhances performance ‑ this is true, but there are a several other options along with it.

SELECT *
FROM sys.configurations
WHERE name ='fill factor (%)'

这是一篇很好的文章和对您查询的解释。

http://sqlmag.com/blog/what-fill-factor-index-fill-factor-and-performance-part-1

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9ef72506-f1b0-4700-b836-851e9871d0a6/merge-table-indexes-fill-factor?forum=sqlreplication