Slow comparison involving encrypted objects
JoshGreenWAUK
Posts: 7 Bronze 1
in SQL Compare
Our schema contains a couple of encrypted objects, and using the "Decrypt encrypted objects" option takes comparison time from 20 seconds to over 20 minutes. All of the extra time, the process is stuck on ExternalResource=ASYNC_NETWORK_IO indicating it's not the SQL Server tying things up.
There is also a large inconsistency in the time taken to compare depending on the database being targeted. One with <1500 objects takes around 20 minutes whereas one with >3000 objects (still containing encrypted objects) takes around 30 seconds. Is there anything I should be looking out for in the database that could cause this? Compatibility levels, dropping and recreating the encrypted objects etc.
I've seen a few questions posted on the forums before and the answer is usually to uncheck "Decrypt encrypted objects", but has anyone got any other solutions that would work?
There is also a large inconsistency in the time taken to compare depending on the database being targeted. One with <1500 objects takes around 20 minutes whereas one with >3000 objects (still containing encrypted objects) takes around 30 seconds. Is there anything I should be looking out for in the database that could cause this? Compatibility levels, dropping and recreating the encrypted objects etc.
I've seen a few questions posted on the forums before and the answer is usually to uncheck "Decrypt encrypted objects", but has anyone got any other solutions that would work?
Tagged:
Answers
Thanks for your post.
Can you confirm which version of SQL Compare you're using?
Kind regards
Richard Lynch.
Redgate Software
Maybe something to note, but I notice it a lot more with DBs being compared across a network rather than being on my local machine. I could pull one of the networked DBs back to my machine to test this out, unless you might have another theory?
Generally speaking, comparison will slow down if you have encrypted objects and "Decrypt encrypted objects" is checked. The time varies and it doesn't only depend on the number of objects but also the complexity of your database.
An unstable network connection definitely doesn't help in this situation and it makes sense to do the tests on a local machine. However, as SQL Compare needs to scan the entire database to understand the dependencies and work out the differences, it can take a while to finish.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Any further diagnostics I can gather to help out here?
Thanks for your reply.
Can you specify exactly what the problem is?
You can always send us a ticket if you have a support contract and this way a dedicated product specialist can help you out with your issue.
Kind regards
Richard Lynch.
Redgate Software
Trying it again now it took around 2 mins (most of the time stuck on "Reading object text (99%)") to do a comparison to a server in our local network, but that's a lot better than the 20+ mins it took when I raised this initially.