Optimizing Snapshot Replication
In this section, we'll discuss optimizing snapshot replication by following best practices and tuning the snapshot and distributor agent parameters.
Snapshot Replication Best Practices
Let's look at a few of the best practices you should consider when working with snapshot replication.
Minimizing Logging at Subscriber
Snapshot replication uses bcp to bulk insert data from the publisher to the subscriber database. It's therefore advised to switch to a bulk-logged or simple recovery model to minimize logging and optimize bulk insert performance.
Note
To find out more about recovery models, refer to https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server?view=sql-server-2017.
Minimizing Locking
As we discussed earlier, snapshot generation applies exclusive locks on tables until the snapshot is generated. This stops any other applications from accessing the tables, resulting in blocking. You can look at the following...