• TheSQLGuru (9/26/2013)

    It has been my experience consulting with numerous clients that deadlocks and blocking are most often rather easily addressed by proper indexing and it usually isn't very hard to figure out what index(es) to put where to accomplish the objectives.

    Personally, given the hardware and licensing costs (and quite possibly consulting costs if you get help to get AGs done up right) to do SQL 2012 EE AGs, I would REALLY recommend doing a tuning exercise FIRST. It is quite possible that you can kill FOUR birds with one stone: faster queries, less blocking AND fewer deadlocks AND saving money because you won't NEED new hardware/EE licenses.

    Thanks for the reply. I didn't fully explain the scenario, sorry :ermm:

    Hardware and licenses aren't really an issue as we will be using existing SQL instances that are currently logshipping secondaries. And, as mentioned, we are addressing the performance issues at source. This is legacy code, rife with nested cursors and repetitive/overlapping queries, that is being slowly reworked. Index tuning and maintenance is one of my main tasks which I carry out on a weekly basis.

    The implementation of availability groups is being planned as part of a wider improvement to high availability and disaster recovery. And, I thought it would be advantageous to further take advantage of the ability to perform read-only tasks (backups, some reporting) from the secondary servers. it is just likely that AG will be implemented before the code rewrite. So I didn't want to make outlandish promises if the secondary databases will run into the same blocking/deadlocking problems as the primary ones.

    I hope this makes sense.

    Tom

    In SQL there are no absolutes, it always depends...