Question: What is Faster, SUM or COUNT? Answer: Both are the same. I was asked this question during my Comprehensive Database Performance Health Check.
SQL SERVER – Automatic Seeding of Availability Database ‘SQLAGDB’ in Availability Group ‘AG’ Failed With a Transient Error. The Operation Will be Retried
Earlier I have written few blogs about automatic seeding feature. In this blog we would learn how to fix error: Automatic seeding of availability database.
COPY_ONLY Full Backup Size: What Differs Between Always On Replicas
A COPY_ONLY full backup of the same database can have a different size on the primary and the secondary replica of an Always On group. This post reads the log pages in the backup messages, shows them on a standalone database and explains how to compare backups fairly. It also covers what a restore needs.
DBCC FLUSHAUTHCACHE: Force Azure SQL to Re-authenticate
DBCC FLUSHAUTHCACHE clears the authentication cache of an Azure SQL database, so open connections must authenticate again. This post shows what a password change does to open sessions on SQL Server, why Azure SQL needs the extra command and how to list the sessions you want to end. It also covers the cautions that matter.
Drop Tables by Prefix in SQL Server and Azure SQL Database
To drop tables by prefix, list the matching tables first and drop them with a script that quotes every schema and table name. This post shows why the underscore in a prefix is a trap, a one-statement version and a cursor version. It works in SQL Server and in Azure SQL Database.
TempDB Performance: Five Settings to Check in SQL Server
TempDB performance depends on five settings that you can read in a few minutes: how big it is, how many data files it has, whether they match, how it grows and where it lives. Three read-only queries check each one. The post also explains what to do with the answers.
CHECKPOINT Duration: Can You Speed Up a Manual CHECKPOINT?
The CHECKPOINT duration argument sets a target time in seconds. This post times a manual checkpoint on a database with 130 MB of dirty pages, and shows that a long duration slows it badly while a short one does not make it faster. It also shows that a backup flushes dirty pages by itself.







