Performance Improvement Wishlist
DanW564
Posts: 5 Bronze 1
In a nutshell, I wish SQL Source Control (SSC) could isolate context of changes similar to the way TortoiseSVN does so for my working directory on my C:\ drive. Virtually all of my source control experience comes from TortoiseSVN, so I'll admit there's probably some of "I only have a hammer, so everything looks like a nail" going on. I've learned a little about Git, and the Bitbucket Server implementation of Git, with all of it's branching and pull requests. It sound intriguing and all, for compile-your-software development, but to me the Subversion paradigm seems to be a closer fit to databases, or at least to the databases that I support.
I just spent some time over a couple of days investigating SQL Source Control to see if it might be an improvement to our current release process, or if it might provide any increased control over changes in a single environment, where there are 15 people that could be making development changes on any given day. I see glimmers of hope for providing better options, but the performance delays seem to be too much to be workable. However, I'd like to throw out some suggestions for what I see as opportunities for improvement of the interface that could really allow this product to scale and shine.
My biggest pain point is the delay of the Commit and Get latest tabs of the SQL Source Control Window. The Migrations tab might have a similar issue, but I haven't looked at it.. I'm just going to focus on the Commit tab. Each time focus changes away from Commit, or changes to another database in Object Explorer, the whole refresh process looks like it starts over from the beginning. I just timed two similar refreshes from two different databases that are each linked differently. One took 45 seconds, while another took 3 minutes. In the mean time, my only real option for doing anything else with SSMS is to open and use a second window so that the refresh can actually finish. So, it seems to me that it must be re-evaluating the status of all objects, comparing my database to my subversion server (because I linked to SVN for Shared mode). Even so, I can tell the SQL Source Control just be maintaining some sort of cache of object statuses, because I see the little blue dots in Object Explorer only on the categories and specific objects that are recognized as having changes to commit.
So, that brings me to wishlist item #1: Use the cache (that appears to be built in the background asynchronously, which is ideal) to display the list of objects with changes to commit. I'm looking at a list of 30 objects that are showing up because of a change to my filter, which were all identified in the Object explorer before I ever clicked on the commit tab. If that was refreshed from a cache, 30 objects should pull up instantaneously.
If I got wishlist #1, that just might be enough for this to be workable. However, I'm still going to list a couple other ideas that seem like easy wins.
#2: Provide a way to isolate or pin the current context of the SQL Source Control window so that while it's working, I could click on whatever else I wanted to in SSMS without stopping the display process. If the display was instantaneous, this might not matter, but I still find it frustrating that I can't tell SSC to stay put while I go look at something else. Why not just provide a drop-down selection for the database to focus on instead of piggy-backing off of my context in Object Explorer?
#3: Let me narrow or isolate the context of the changes I want to consider committing, separate from changing the filter that already exists. The current filter controls what is considered to be under source control, which is good, but I would like to also be able to search or filter the list of changes to consider what I want to commit right now. In our team environment, I might be looking for one out of a hundred pending changes. One idea/example for how to narrow the context would be drilling into my list of views, seeing blue dots on two views, and being able to quickly initiate a commit of both views by right-clicking on "Views" (the same way if I right click on a folder in Windows Explorer, TortoiseSVN only pulls up a list of changes identified in that folder and child folders). Another idea would be to be able to right-click on a single view object to initiate a commit of only the changes of that view. Of course, but just to be clear, this idea is about any of the various database object types, not just about views.
For the databases I work on, many objects are independent of each other, so those of us on my team often don't have to keep change A in lock-step with change B, so isolating context is often needed. I could see SSC working well for situations where the database is just part of an application that gets distributed, but that's not my use case.
Thank you to everyone at RedGate that has provided so many awesome tools to help with database development and support. SQL Compare is a lifesaver, and SQL Prompt is a breath of fresh air to database development. Right now SQL Source Control is so close, yet so far out of reach, that I wanted to share what keeps it from being workable for me and how it seems feasible to make it workable for situations like mine. Please keep up the great work at RedGate!
My environment specs:
A data warehouse type of database with about 9000 objects in the initial commit
Both the database and subversion servers reside in a remote data center with a very high speed WAN connection between my location and the data center
SQL Server 2014
Subversion Server version unknown, but likely quite old
SQL Source Control version 6.2.3.7820
SSMS version 17.3
Windows 7, 64 bit Core i7, 16 GB Ram, SSD local drive
I just spent some time over a couple of days investigating SQL Source Control to see if it might be an improvement to our current release process, or if it might provide any increased control over changes in a single environment, where there are 15 people that could be making development changes on any given day. I see glimmers of hope for providing better options, but the performance delays seem to be too much to be workable. However, I'd like to throw out some suggestions for what I see as opportunities for improvement of the interface that could really allow this product to scale and shine.
My biggest pain point is the delay of the Commit and Get latest tabs of the SQL Source Control Window. The Migrations tab might have a similar issue, but I haven't looked at it.. I'm just going to focus on the Commit tab. Each time focus changes away from Commit, or changes to another database in Object Explorer, the whole refresh process looks like it starts over from the beginning. I just timed two similar refreshes from two different databases that are each linked differently. One took 45 seconds, while another took 3 minutes. In the mean time, my only real option for doing anything else with SSMS is to open and use a second window so that the refresh can actually finish. So, it seems to me that it must be re-evaluating the status of all objects, comparing my database to my subversion server (because I linked to SVN for Shared mode). Even so, I can tell the SQL Source Control just be maintaining some sort of cache of object statuses, because I see the little blue dots in Object Explorer only on the categories and specific objects that are recognized as having changes to commit.
So, that brings me to wishlist item #1: Use the cache (that appears to be built in the background asynchronously, which is ideal) to display the list of objects with changes to commit. I'm looking at a list of 30 objects that are showing up because of a change to my filter, which were all identified in the Object explorer before I ever clicked on the commit tab. If that was refreshed from a cache, 30 objects should pull up instantaneously.
If I got wishlist #1, that just might be enough for this to be workable. However, I'm still going to list a couple other ideas that seem like easy wins.
#2: Provide a way to isolate or pin the current context of the SQL Source Control window so that while it's working, I could click on whatever else I wanted to in SSMS without stopping the display process. If the display was instantaneous, this might not matter, but I still find it frustrating that I can't tell SSC to stay put while I go look at something else. Why not just provide a drop-down selection for the database to focus on instead of piggy-backing off of my context in Object Explorer?
#3: Let me narrow or isolate the context of the changes I want to consider committing, separate from changing the filter that already exists. The current filter controls what is considered to be under source control, which is good, but I would like to also be able to search or filter the list of changes to consider what I want to commit right now. In our team environment, I might be looking for one out of a hundred pending changes. One idea/example for how to narrow the context would be drilling into my list of views, seeing blue dots on two views, and being able to quickly initiate a commit of both views by right-clicking on "Views" (the same way if I right click on a folder in Windows Explorer, TortoiseSVN only pulls up a list of changes identified in that folder and child folders). Another idea would be to be able to right-click on a single view object to initiate a commit of only the changes of that view. Of course, but just to be clear, this idea is about any of the various database object types, not just about views.
For the databases I work on, many objects are independent of each other, so those of us on my team often don't have to keep change A in lock-step with change B, so isolating context is often needed. I could see SSC working well for situations where the database is just part of an application that gets distributed, but that's not my use case.
Thank you to everyone at RedGate that has provided so many awesome tools to help with database development and support. SQL Compare is a lifesaver, and SQL Prompt is a breath of fresh air to database development. Right now SQL Source Control is so close, yet so far out of reach, that I wanted to share what keeps it from being workable for me and how it seems feasible to make it workable for situations like mine. Please keep up the great work at RedGate!
My environment specs:
A data warehouse type of database with about 9000 objects in the initial commit
Both the database and subversion servers reside in a remote data center with a very high speed WAN connection between my location and the data center
SQL Server 2014
Subversion Server version unknown, but likely quite old
SQL Source Control version 6.2.3.7820
SSMS version 17.3
Windows 7, 64 bit Core i7, 16 GB Ram, SSD local drive
Comments
As much as I'd like to say "don't recheck the repo v database", I also know this would likely cause no shortage of complaints and issues, especially in shared environments. Imagine SSMS crashes, which we have to account for. If you then go to commit, are we sure the cache is correct?
This is really an issue. Ideally we'd be able to read an XE session of all changes that have occurred, but that's a really hard problem.
Conflicts become even more of an issue with shared work. Multiple developers could end up committing the same work. I wish this were simpler,but it's not, and databases are similar to, but vastly different than app code (C# ,Java, etc).
I agree with you we ought to do something, but every time this gets tackled, we struggle with finding a solution that actually protects code and scales to multiple developers. If you always work dedicated, I think this an easier thing to solve, though even then you'd have to say only SSMS can make changes.
#2 - SSMS is a piece of manure in some ways. We're hacked in there and have some limits in what we can do with the UI. That's part of the issue, though I'd like to think that what we ought to do here is disconnect from OE. Just have a drop down and force you to do that every time. We've had some UI feedback that people like the "current" database to be the one SOC finds, but over time I think this is bad. I'd rather explicitly select this.
I have little confidence I could make this change work, but if you can rally more votes - https://redgate.uservoice.com/forums/39019-sql-source-control/suggestions/35143396-disconnect-the-soc-pane-from-object-explorer
I think the UI to easily/quickly limit objects in some filter isn't necessarily easy, but I do think that perhaps a "search" feature for commits might eb nice, allowing me to see specific changes and commit those. The hard part of implementing this is that I search for "Sales" and click the Sales table. However, I want to also commit "GetWeeklyTotals" and search for that. Keeping a running list along with a changing list of selected items is likely a larger UI change than anyone wants to make.
That being said, if you wanted to propose a fix like that, I could be convinced to vote. The hard part here, and why I think a shared database with source control is a problem, is that you are potentially making changes, as are others, and until you commit, it's possible someone else will overwrite your change. It's also possible that they won't realize that their change later might conflict with yours if they can limit filter too many things.
Re#1: I think I hear your concern. Essentially, I hear you saying that you need to guard against users blaming you for something going wrong because the tool didn't protect them from something they thought it would protect them from. I get that, but I'm also confident that it's possible to cause damage with any tool, and you can't completely protect us from ourselves.
Here's a compromise idea that I would be thrilled about: What if the cache of identified items was used to quickly identify objects, and initially, only those objects were re-checked (database vs repo)? Then, this short list was displayed, but the full re-check was initiated. While the full re-check was running, allow for an option to stop/cancel the full re-check (such that we can't commit unless the full refresh is cancelled), but show some warning that the user has to acknowledge before the full re-check gets stopped (maybe even log it to protect yourselves...?). That way, when users complain that something broke because of a change someone else made that they were not aware of, at least they know, and you can remind them, that they intentionally disabled your safety net. If something like that was implemented, I'd have a new lease on the possibility of using SQL Source Control in my current job.
With any source code repository (at least as I understand it), it's possible to commit a change that will have a conflict with a commit done by someone else. We have to do an Update (SVN) or Pull (Git) to see changes potentially done by someone else. Relative to that, I see cached list of recognized changes as analogous to my working copy folder (SVN) or local repository (Git), so I don't see trusting the cache to identify differences between the database an the linked repository to be all that big of deal. Wouldn't any repository warn of a conflict if someone committed a different change to the same object/file, or at least a change that couldn't be automatically merged?
Re#3: I wasn't trying to ask for a filter by user, only by object type, or a way to commit a single object, based on the changes identified by the polling process.
I tried yesterday to post a new idea to the uservoice site, but the post idea button appeared to not be working for me. I tried both Chrome and IE, but neither worked from what I could see. Either that, or there are several new ideas posted by me with no real content that I couldn't find with the search.
The issue for trying to catch things in the VCS occurs with related objects. Let me give you an example.
That being said, while anyone can mess up any tool, our job is to minimize the places where the tool could lead you to make mistakes.