Insanely slow 'Refresh' functionality

Recently we've finally moved from ReadyRoll to SQL Change Automation. Suddenly each 'Refresh' takes ages (~20-30 min) instead of seconds (~5-10sec) which makes the tool essentially unusable. There're no queries running in DB during this refresh and nothing particular in the logs.

It's pretty much the only change we've made so it's high chance that SQL Change Automation is the tool to blame. I hope it's not supposed to work like this (it definitely wasn't the case before update). What can we do in order to find the cause and fix this issue? 
Tagged:

Best Answer

  • Greg_SmulkoGreg_Smulko Posts: 16 Bronze 4
    Accepted Answer
    We were able to identify the root cause of this issue and we're working on a permanent fix.

    For now, a workaround is to add the following line into a PropertyGroup in the .sqlproj:
    <SyncOptionIgnoreConstraintNotForReplicationAttribute>False</SyncOptionIgnoreConstraintNotForReplicationAttribute>
    Sorry for the inconvenience caused.

    For the future reference, regarding creating support tickets, please start from the https://productsupport.red-gate.com/hc/en-us page , where you can submit a request.
    Greg Smulko | Software Engineer | Redgate Software

Answers

  • Hi Roman,

    I'm really sorry that you're encountering such a degradation of performance.
    Do you know which version of ReadyRoll you were using before?

    Can you please change the logging setting in the logging.config files by setting it to the below value:
    <level value="DEBUG" /> 
    These files are at these locations:
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\SqlChangeAutomation\logging.config
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\001rr241.rgs\logging.config (001rr241.rgs will be different in your case).

    Please note that the folder locations might be different depending on the version of VS that you are using.

    The log files should help to pinpoint the exact operation that takes most of the time. 
    After you replicate the issue please change it from `DEBUG` to `FATAL`, to make sure that logging itself is not the culprit.
    Greg Smulko | Software Engineer | Redgate Software
  • RomanPekarRomanPekar Posts: 13 Bronze 1
    Hi Greg,

    Thanks for your tip.
    The version of RR we were using before update is 1.14.

    I've set level to DEBUG, and there's more information in the log now. But it still not clear what's the reason for the issue is, I just see a big gap (~10 minutes) between 2 lines in the log file.
    Do you think there're something else we can do?

    I've tried to check what happens with Process Monitor but cannot see anything specific (there're quite some activity from SQL LightHouse service and a lot of access to Temp\user\Red Gate\*.tmp files though)

  • Greg_SmulkoGreg_Smulko Posts: 16 Bronze 4
    edited October 8, 2018 9:55AM
    Hi Roman, could you paste these 2 lines from the log file between which a gap occurs?

    It seems that you've found the logs yourself, for future reference they're stored in 
    %localappdata%\Red Gate\Logs\SQL Change Automation


    Greg Smulko | Software Engineer | Redgate Software
  • RomanPekarRomanPekar Posts: 13 Bronze 1
    edited October 8, 2018 11:31AM
    It looks like this:

    <div>080892|2018-10-08 13:08:12.370|DEBUG|RedGate.Versioning.Core.VersioningProject.DatabaseProject|83|Changed file: C:\Projects\Roman.Pekar\TestProject\Schema-Model\data\Tables\TEST.sql
    <span style="background-color: transparent; color: inherit; font-size: inherit; font-family: roboto, &quot;helvetica neue&quot;, Arial, sans-serif;">080892|2018-10-08 13:17:14.864|DEBUG|RedGate.Versioning.Client.VsShell.VisualStudio.ShellIntegration.VisualStudioProjectFileUpdater|70|The following files have been added:
    </span><span style="background-color: transparent; color: inherit; font-size: inherit; font-family: roboto, &quot;helvetica neue&quot;, Arial, sans-serif;">080892|2018-10-08 13:17:14.953|DEBUG|RedGate.Versioning.Client.VsShell.VisualStudio.ShellIntegration.VisualStudioProjectFileUpdater|70|Number of assets to add to project: 0</span></div>
  • samssb82samssb82 Posts: 12 Bronze 2
    I have seen this behavior, but in our scenario it is when there is a change to a large stored procedure or view.  I believe it is attempting to identify the differences.
  • RomanPekarRomanPekar Posts: 13 Bronze 1
    samssb82 said:
    I have seen this behavior, but in our scenario it is when there is a change to a large stored procedure or view.  I believe it is attempting to identify the differences.
    Hm I think it can be interesting to check if 'refresh' works better if there's no changes at all, thanks!
  • RomanPekarRomanPekar Posts: 13 Bronze 1
    Hi Roman, could you paste these 2 lines from the log file between which a gap occurs?


    Greg, any new insights of the problem? Please let me know if we can expect some changes/advises or if we have to start looking into some workarounds.
  • Hi Roman, I'm just releasing a new version of the product with extended logging, the version number is 3.0.18283.
    Could you please install this version and provide the logs again?
    Sorry for the inconvenience caused.
    Actually, if you could file a support ticket, we could provide you with better assistance.
    Greg Smulko | Software Engineer | Redgate Software
  • And how do we create a support ticket?
  • RomanPekarRomanPekar Posts: 13 Bronze 1
    We were able to identify the root cause of this issue and we're working on a permanent fix.

    For now, a workaround is to add the following line into a PropertyGroup in the .sqlproj:
    &lt;SyncOptionIgnoreConstraintNotForReplicationAttribute&gt;False&lt;/SyncOptionIgnoreConstraintNotForReplicationAttribute&gt;
    Sorry for the inconvenience caused.

    For the future reference, regarding creating support tickets, please start from the https://productsupport.red-gate.com/hc/en-us page , where you can submit a request.
    Hi Greg,

    Thanks, that was it! Seems to work fine now.
    I was going to create this request but I haven't seen anything meaningful in the logs of the new version so I was going to conduct proper test before I send it to you.

  • duggergduggerg Posts: 5 New member
    edited November 20, 2018 9:34PM
    This has not helped us by setting it to true or false. I am also seeing it create Security folders and files each time I try a new baseline even though I have set every option that deals with users, permissions, roles, etc to be ignored. What am I missing?

    <div>&lt;PropertyGroup&gt;</div><div>&nbsp; &nbsp; &lt;!-- These properties might be set by the Developer --&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIncludeDependentObjects&gt;False&lt;/SyncOptionIncludeDependentObjects&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIncludeExistenceChecks&gt;False&lt;/SyncOptionIncludeExistenceChecks&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionUseDropCreateInsteadOfAlter&gt;False&lt;/SyncOptionUseDropCreateInsteadOfAlter&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionDisableDdlTriggers&gt;False&lt;/SyncOptionDisableDdlTriggers&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionCaseSensitiveObjectDefinition&gt;False&lt;/SyncOptionCaseSensitiveObjectDefinition&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreExtendedProperties&gt;False&lt;/SyncOptionIgnoreExtendedProperties&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreCommentsInBodies&gt;False&lt;/SyncOptionIgnoreCommentsInBodies&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreAnsiOptions&gt;False&lt;/SyncOptionIgnoreAnsiOptions&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreCollations&gt;True&lt;/SyncOptionIgnoreCollations&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreColumnsOrder&gt;True&lt;/SyncOptionIgnoreColumnsOrder&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreWhiteSpace&gt;True&lt;/SyncOptionIgnoreWhiteSpace&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreSynonymDatabaseAndServerName&gt;True&lt;/SyncOptionIgnoreSynonymDatabaseAndServerName&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoretSQLt&gt;True&lt;/SyncOptionIgnoretSQLt&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreDmlTriggers&gt;False&lt;/SyncOptionIgnoreDmlTriggers&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreInsteadOfTriggers&gt;False&lt;/SyncOptionIgnoreInsteadOfTriggers&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreBindings&gt;False&lt;/SyncOptionIgnoreBindings&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreQueueEventNotifications&gt;False&lt;/SyncOptionIgnoreQueueEventNotifications&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreSquareBrackets&gt;False&lt;/SyncOptionIgnoreSquareBrackets&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreWithElementOrder&gt;True&lt;/SyncOptionIgnoreWithElementOrder&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreWithEncryption&gt;False&lt;/SyncOptionIgnoreWithEncryption&gt;</div><div>&nbsp; &nbsp; &lt;!-- These properties might be set by the DBA --&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreDataspaces&gt;True&lt;/SyncOptionIgnoreDataspaces&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreConstraintNotForReplicationAttribute&gt;True&lt;/SyncOptionIgnoreConstraintNotForReplicationAttribute&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreFillFactor&gt;False&lt;/SyncOptionIgnoreFillFactor&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreIndexLockAttributes&gt;False&lt;/SyncOptionIgnoreIndexLockAttributes&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreStatistics&gt;True&lt;/SyncOptionIgnoreStatistics&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreDataCompression&gt;True&lt;/SyncOptionIgnoreDataCompression&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreFullTextIndexing&gt;False&lt;/SyncOptionIgnoreFullTextIndexing&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreReplicationTriggers&gt;True&lt;/SyncOptionIgnoreReplicationTriggers&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreSchemaObjectAuthorization&gt;False&lt;/SyncOptionIgnoreSchemaObjectAuthorization&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreStatisticsNorecompute&gt;False&lt;/SyncOptionIgnoreStatisticsNorecompute&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionConsiderNextFilegroupInPartitionSchemes&gt;False&lt;/SyncOptionConsiderNextFilegroupInPartitionSchemes&gt;</div><div>&nbsp; &nbsp; &lt;!-- Shared Developer/DBA options --&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreIndexes&gt;False&lt;/SyncOptionIgnoreIndexes&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnorePermissions&gt;True&lt;/SyncOptionIgnorePermissions&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreConstraintWithNoCheckAttribute&gt;False&lt;/SyncOptionIgnoreConstraintWithNoCheckAttribute&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreNocheckAndWithNocheckAttributes&gt;False&lt;/SyncOptionIgnoreNocheckAndWithNocheckAttributes&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreIdentitySeedAndIncrement&gt;True&lt;/SyncOptionIgnoreIdentitySeedAndIncrement&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreUserProperties&gt;True&lt;/SyncOptionIgnoreUserProperties&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionIgnoreUsersPermissionsAndRoleMemberships&gt;True&lt;/SyncOptionIgnoreUsersPermissionsAndRoleMemberships&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionAddWithEncryption&gt;False&lt;/SyncOptionAddWithEncryption&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionDecryptEncryptedObjects&gt;False&lt;/SyncOptionDecryptEncryptedObjects&gt;</div><div>&nbsp; &nbsp; &lt;SyncOptionUseCompatibilityLevel&gt;False&lt;/SyncOptionUseCompatibilityLevel&gt;</div><div>&nbsp; &nbsp; &lt;!-- Data comparison/sync options --&gt;</div><div>&nbsp; &nbsp; &lt;!--</div><div>&nbsp; &nbsp; &lt;SyncDataOptionDropKeysIndexesAndConstraints&gt;False&lt;/SyncDataOptionDropKeysIndexesAndConstraints&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionDisableForeignKeys&gt;False&lt;/SyncDataOptionDisableForeignKeys&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionIncludeTimestampColumns&gt;False&lt;/SyncDataOptionIncludeTimestampColumns&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionCaseSensitiveObjectDefinition&gt;True&lt;/SyncDataOptionCaseSensitiveObjectDefinition&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionForceBinaryCollation&gt;True&lt;/SyncDataOptionForceBinaryCollation&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionTrimTrailingSpaces&gt;False&lt;/SyncDataOptionTrimTrailingSpaces&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionDisableDmlTriggers&gt;False&lt;/SyncDataOptionDisableDmlTriggers&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionDisableDdlTriggers&gt;True&lt;/SyncDataOptionDisableDdlTriggers&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionDontIncludeCommentsInScript&gt;False&lt;/SyncDataOptionDontIncludeCommentsInScript&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionReseedIdentityColumns&gt;False&lt;/SyncDataOptionReseedIdentityColumns&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionSkipIntegrityChecksForForeignKeys&gt;False&lt;/SyncDataOptionSkipIntegrityChecksForForeignKeys&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionTransportClrDataTypesAsBinary&gt;False&lt;/SyncDataOptionTransportClrDataTypesAsBinary&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionCompressTemporaryFiles&gt;False&lt;/SyncDataOptionCompressTemporaryFiles&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionTreatEmptyStringAsNull&gt;False&lt;/SyncDataOptionTreatEmptyStringAsNull&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionUseChecksumComparison&gt;False&lt;/SyncDataOptionUseChecksumComparison&gt;</div><div>&nbsp; &nbsp; &lt;SyncDataOptionUseMaxPrecisionForFloatComparison&gt;False&lt;/SyncDataOptionUseMaxPrecisionForFloatComparison&gt;</div><div>&nbsp; &nbsp; --&gt;</div><div>&nbsp; &lt;/PropertyGroup&gt;</div>
  • Have you put the setting outside the comment block?
  • duggergduggerg Posts: 5 New member
    Almost all of them are outside the comment blocks in the code snippet. Only the data related comparisons are commented.
Sign In or Register to comment.