Warning for Updates that will Take a Long Time

clethertclethert Posts: 2 New member
Is there a way to flag changes that will take a long time to apply?  If not, I would love if you could add that.  Right now, it seems like there is a warning when a table rebuild is required (very helpful), but there is no warning if a non-nullable column with a default is added to a large table, for example - even though that could take a long time and cause a lot of blocking.  I realize what qualifies as a "large table" is going to vary by situation, but it would be nice if there was a way to flag if an update is going to have to touch every row in a table and the table has more than n rows.

Best Answer

  • David AtkinsonDavid Atkinson Posts: 1,431 Rose Gold 2
    @clethert - Doing this in SQL Compare might be interesting. I think that we don't currently analyze the target database for table sizes so would have to fetch the stats and use this to decide whether to trigger a warning. Is this what you had in mind?
    David Atkinson
    Product Manager
    Redgate Software

Answers

  • @clethert - one thing we'd like to do is to encourage a deployment rehearsal as part of a CI process, which is made possible because database clones (SQL Clone) can be spun up near instantly. As part of this we'd record and report on the time it takes to complete each "migration". To get granular information this would probably require the use of the migrations-based approach, as the time to run migrations is something we have at hand already.
    David Atkinson
    Product Manager
    Redgate Software
  • clethertclethert Posts: 2 New member
    Yes, that is basically what I was thinking, thanks.  Even if you just had an option to warn on any update that requires touching all rows regardless of table size, I think that could be useful.  Kind of like how the program warns about a table rebuild now, even if the table only has a small number of rows.
Sign In or Register to comment.