%3CLINGO-SUB%20id%3D%22lingo-sub-386140%22%20slang%3D%22en-US%22%3EAutomatic%20index%20management%20in%20Azure%20SQL%20database%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386140%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20May%2016%2C%202017%20%3C%2FSTRONG%3E%3CBR%20%2F%3EAzure%20SQL%20Database%20has%20a%20built-in%20intelligence%20mechanism%20that%20can%20automatically%20tune%20and%20improve%20performance%20of%20your%20queries%20by%20dynamically%20adapting%20the%20database%20schema%20to%20your%20workload.%20In%20Azure%20SQL%20Database%2C%20you%20don%E2%80%99t%20need%20to%20worry%20about%20the%20index%20analysis%20and%20design%2C%20because%20Azure%20SQL%20Database%20learns%20about%20your%20workload%20and%20ensures%20that%20your%20data%20is%20always%20optimally%20indexed.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3EWhy%20do%20you%20need%20index%20management%3F%20%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIndexes%20speed%20up%20some%20of%20your%20queries%20that%20read%20data%20from%20the%20tables%3B%20however%2C%20they%20might%20slowdown%20the%20queries%20that%20update%20data.%20You%20need%20to%20carefully%20analyze%20when%20to%20create%20a%20new%20index%20and%20what%20columns%20you%20need%20to%20include%20in%20the%20index.%20Some%20indexes%20might%20not%20be%20needed%20after%20some%20time%3B%20therefore%2C%20you%20would%20need%20to%20periodically%20identify%20them%20and%20drop%20them%20if%20they%20bring%20no%20benefits.%20If%20you%20ignore%20the%20unused%20indexes%2C%20performance%20of%20the%20queries%20that%20update%20data%20would%20be%20decreased%20without%20any%20benefit%20on%20the%20queries%20that%20read%20data.%20Unused%20indexes%20also%20affect%20overall%20performance%20of%20the%20system%20because%20additional%20updates%20requires%20unnecessary%20logging%20and%20increases%20WRITELOG%20wait%20statistics.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Finding%20the%20optimal%20set%20of%20indexes%20that%20will%20improve%20performance%20of%20the%20queries%20that%20read%20data%20from%20your%20tables%20that%20at%20the%20same%20time%20minimally%20impact%20updates%2C%26nbsp%3Bmight%20require%20continuous%20and%20very%20complex%20analysis.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Some%20database%20systems%20try%20to%20solve%20index%20management%20problem%20by%20introducing%20advanced%20indexes%20that%20automatically%20include%20as%20much%20as%20possible%20fields%20in%20the%20index.%20In%20these%20cases%2C%20you%20don%E2%80%99t%20need%20to%20think%20about%20the%20indexes%20that%20should%20be%20added%20on%20your%20data%2C%20because%20one%20general-purpose%20index%20can%20be%20used%20in%20a%20variety%20of%20queries%20that%20read%20data.%20However%2C%20these%20indexes%20still%20affect%20update%20performance%2C%20so%20they%20are%20good%20solution%20for%20unpredictable%20read-only%20workloads.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Azure%20SQL%20Database%20supports%20a%20variety%20of%20workload%20types%2C%20so%20it%20cannot%20assume%20that%20one%20index%20might%20solve%20all%20performance%26nbsp%3Bproblems.%20Also%2C%20it%20will%20not%20enforce%20users%20to%20do%20all%20hard%20and%20tedious%20index%20management%20analysis.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Azure%20SQL%20Database%20uses%20built-in%20intelligence%20and%20advanced%20rules%20that%20analyze%20your%20queries%2C%20identify%20what%20kind%20of%20indexes%20would%20be%20optimal%20for%20your%20current%20workloads%2C%20and%20what%20indexes%20might%20be%20removed.%20This%20way%2C%20Azure%20SQL%20Database%20ensures%20that%20you%20have%20a%20minimal%20necessary%20set%20of%20indexes%20that%20optimize%20most%20of%20your%20queries%20that%20read%20data%2C%20with%20the%20minimized%20impact%20on%20the%20queries%20that%20updates.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20These%20are%20the%20best%20practices%20based%20on%20the%20experience%20of%20the%20thousands%20database%20experts%20who%20manage%20their%20own%20database%20last%2020%20years.%20The%20best%20practices%20are%20built-in%20directly%20into%20the%20Azure%20SQL%20Database%20engine%20and%20available%20to%20all%20Azure%20SQL%20Database%20users.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3EHow%20to%20identify%20indexes%20that%20need%20to%20be%20changed%20in%20your%20database%3F%20%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAzure%20SQL%20Database%20makes%20index%20management%20process%20easy.%20Instead%20of%20the%20tedious%20process%20of%20manual%20workload%20analysis%20and%20index%20monitoring%2C%20Azure%20SQL%20Database%20analyzes%20your%20workload%2C%20identifies%20the%20queries%20that%20could%20be%20executed%20faster%20if%20you%20create%20an%20index%2C%20identifies%20indexes%20that%20are%20not%20used%20in%26nbsp%3Ba%20longer%20period%20of%20time%2C%20and%20identifies%20duplicated%20indexes%20in%20the%20database.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20On%20the%20Azure%20portal%2C%20you%20can%20find%20a%20set%20of%20recommendations%20that%20you%20might%20apply%20to%20optimize%20performance%20of%20your%20database%20by%20creating%20missing%20indexes%20or%20dropping%20duplicate%20indexes.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F98967i112BCC27F6CF182B%22%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20In%20this%20report%2C%20you%20might%20see%20the%20actions%20that%20you%20might%20execute%2C%20information%20about%20the%20index%20that%20you%20should%20create%2C%20or%20name%20of%20the%20index%20that%20you%20might%20drop.%20All%20recommendations%20have%20associated%20impact%20that%20indicates%20the%20gain%20that%20you%20can%20get%20if%20you%20apply%20this%20recommendation%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EAutomatic%20index%20management%20%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20find%20that%20the%20built-in%20rules%20improve%20the%20performance%20of%20your%20database%20%E2%80%93%20you%20might%20let%20Azure%20SQL%20database%20automatically%20manage%20your%20indexes%2C%20decide%20when%20to%20create%20necessary%20indexes%20and%20remove%20unused%20indexes.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20You%20can%20go%20to%20Azure%20portal%2C%20and%20enable%20Azure%20SQL%20Database%20to%20automatically%20create%20or%20drop%20indexes%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F98968i34CD162B87E6C7D1%22%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20can%20let%20Azure%20SQL%20Database%20to%20both%20create%20necessary%20indexes%20and%20remove%20unnecessary%20indexes%2C%20or%20choose%20which%20of%20these%20options%20should%20automatically%20done%20and%20what%20you%20want%20to%20do%20manually.%20You%20can%20always%20change%20your%20decision%20and%20turn%20on%2Foff%20some%20of%20these%20automatic%20tuning%20options.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20One%20important%20feature%20in%20Automatic%20index%20management%20is%20continuous%20verification%20of%20the%20actions.%20When%20Azure%20SQL%20Database%20executes%20create%20index%20or%20drop%20index%20action%2C%20a%20continuous%20monitoring%20process%20analyzes%20performance%20of%20your%20workload%2C%20and%20analyzes%20did%20the%20action%20improve%20the%20performance.%20If%20the%20assumption%20was%20not%20correct%20or%20if%20it%20didn%E2%80%99t%20bring%20significant%20improvement%20%E2%80%93%20the%20action%20will%20be%20immediately%20reverted.%20This%20way%2C%20Azure%20SQL%20Database%20ensures%20that%20automatic%20actions%20will%20not%20affect%20performance%20of%20your%20workload.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CSTRONG%3ESummary%20%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAzure%20SQL%20Database%20has%20intelligent%20automatic%20tuning%20mechanism%20that%20takes%20care%20of%20your%20indexes.%20If%20you%20cannot%20identify%20and%20monitor%20your%20indexes%2C%20you%20can%20let%20the%20Azure%20SQL%20database%20do%20index%20management%20for%20you%2C%20tune%20your%20database%2C%20and%20ensure%20that%20your%20data%20structures%20dynamically%20adapts%20to%20your%20workload.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Find%20more%20information%20about%20automatic%20index%20management%20on%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-advisor-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Documentation%20%3C%2FA%3E.%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-386140%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20May%2016%2C%202017%20Azure%20SQL%20Database%20has%20a%20built-in%20intelligence%20mechanism%20that%20can%20automatically%20tune%20and%20improve%20performance%20of%20your%20queries%20by%20dynamically%20adapting%20the%20database%20schema%20to%20your%20workload.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-386140%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerStorageEngine%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on May 16, 2017
Azure SQL Database has a built-in intelligence mechanism that can automatically tune and improve performance of your queries by dynamically adapting the database schema to your workload. In Azure SQL Database, you don’t need to worry about the index analysis and design, because Azure SQL Database learns about your workload and ensures that your data is always optimally indexed.



Why do you need index management?

Indexes speed up some of your queries that read data from the tables; however, they might slowdown the queries that update data. You need to carefully analyze when to create a new index and what columns you need to include in the index. Some indexes might not be needed after some time; therefore, you would need to periodically identify them and drop them if they bring no benefits. If you ignore the unused indexes, performance of the queries that update data would be decreased without any benefit on the queries that read data. Unused indexes also affect overall performance of the system because additional updates requires unnecessary logging and increases WRITELOG wait statistics.

Finding the optimal set of indexes that will improve performance of the queries that read data from your tables that at the same time minimally impact updates, might require continuous and very complex analysis.

Some database systems try to solve index management problem by introducing advanced indexes that automatically include as much as possible fields in the index. In these cases, you don’t need to think about the indexes that should be added on your data, because one general-purpose index can be used in a variety of queries that read data. However, these indexes still affect update performance, so they are good solution for unpredictable read-only workloads.

Azure SQL Database supports a variety of workload types, so it cannot assume that one index might solve all performance problems. Also, it will not enforce users to do all hard and tedious index management analysis.

Azure SQL Database uses built-in intelligence and advanced rules that analyze your queries, identify what kind of indexes would be optimal for your current workloads, and what indexes might be removed. This way, Azure SQL Database ensures that you have a minimal necessary set of indexes that optimize most of your queries that read data, with the minimized impact on the queries that updates.

These are the best practices based on the experience of the thousands database experts who manage their own database last 20 years. The best practices are built-in directly into the Azure SQL Database engine and available to all Azure SQL Database users.

How to identify indexes that need to be changed in your database?

Azure SQL Database makes index management process easy. Instead of the tedious process of manual workload analysis and index monitoring, Azure SQL Database analyzes your workload, identifies the queries that could be executed faster if you create an index, identifies indexes that are not used in a longer period of time, and identifies duplicated indexes in the database.

On the Azure portal, you can find a set of recommendations that you might apply to optimize performance of your database by creating missing indexes or dropping duplicate indexes.



In this report, you might see the actions that you might execute, information about the index that you should create, or name of the index that you might drop. All recommendations have associated impact that indicates the gain that you can get if you apply this recommendation

Automatic index management

If you find that the built-in rules improve the performance of your database – you might let Azure SQL database automatically manage your indexes, decide when to create necessary indexes and remove unused indexes.

You can go to Azure portal, and enable Azure SQL Database to automatically create or drop indexes:



You can let Azure SQL Database to both create necessary indexes and remove unnecessary indexes, or choose which of these options should automatically done and what you want to do manually. You can always change your decision and turn on/off some of these automatic tuning options.

One important feature in Automatic index management is continuous verification of the actions. When Azure SQL Database executes create index or drop index action, a continuous monitoring process analyzes performance of your workload, and analyzes did the action improve the performance. If the assumption was not correct or if it didn’t bring significant improvement – the action will be immediately reverted. This way, Azure SQL Database ensures that automatic actions will not affect performance of your workload.

Summary

Azure SQL Database has intelligent automatic tuning mechanism that takes care of your indexes. If you cannot identify and monitor your indexes, you can let the Azure SQL database do index management for you, tune your database, and ensure that your data structures dynamically adapts to your workload.

Find more information about automatic index management on Azure Documentation .