Azure SQL Database - Index And Statistic Management
DBA Tasks in Azure DB
It was a big surprise to me when I learned that Azure SQL Database doesn’t update statistics or indexes automatically. The option to automatically update statistics exists (e.g., ALTER DATABASE [WideWorldImporters] SET AUTO_UPDATE_STATISTICS ON), and is on by default, but it does not give the same control as updating them manually with the ‘UPDATE STATISTICS’ command. When Azure DB was first pitched to us, on an internal project, one of the big selling points was “no maintenance required”. This wasn’t a statement from Microsoft or even from the documentation. It was clearly a marketing talking-point that leaked into the technical discussions. It’s partially true. Some things are automatic, but there are a few things you still need to maintain or at least monitor yourself. The big shocker, as you already know from the first sentence above, is that indexes aren’t automatically rebuilt for you and statistics aren’t maintained beyond the database configuration item.