I have Always-On synchronization on some databases, We want to change from asynchronize mode to synchronize mode, I tested to see what the change in performance between the two, and found that in general the select statements keep the same duration with and without synchronize mode, most of the update\insert usually take around * 4 times from the asynchronize mode, BUT some updates take much longer. I would like to understand why things take MUCH longer (I understand that working with synchronize mode is a 2 phase commit and should take * 4 times, but I can't understand why some of them take 50 - 100 times more).
1. One query is an update made on a table with few records (up to 40 records), this update run 250K times a day, and a very simple update on this table takes * 98 than without synchronize mode
1. An update on a big table with 2 million records, using a query that specify the unique column in the primary cluster key, takes 50 times more.
What are the factors that have dramatic influence on performance when 2 phase commit (asynchronize mode) is used?