I am upgrading our SF to version 2025.1 (from version 2023.1) and i am running some test upgrades to see how smoothly this will go and what the changes are. We are running on SQL Server 2019.
I noticed that when i do an iam synchronisation of a “new” branch to an IAM that this executes faster than before . But when i change some roles and do an IAM synchronisation of an existing branch in the target IAM that the synchronisation process takes forever.

In the example above i stopped the process because it took to long.
In Management Studio i see it is working on this query. The role_tab_variant_look_up table has more than 750k lines.

Also in general i occasionally experience that merge statements sometimes take very long.
Anyone else ever experienced the same problems and fixed it.