top of page

Azure SQL Database Automatic Tuning

  • Writer: Jha Chandan
    Jha Chandan
  • Aug 18, 2022
  • 2 min read

In this blog we will learn about automatic tuning of your Azure SQL Database. Being a DBA, We all are familiar with Database or SQL Statements Tuning which is the process of ensuring that the SQL database or statements issued by an application run in the fastest possible time. In other words, tuning SQL statements is finding and taking the fastest route to answer your query, just like discovering the fastest route to your home after work.


In Azure we have features like Query Store feature under the covers from where Azure SQL Database can create indexes for you, drop redundant indexes and also if it finds any plan regression it automatically chooses the last good plan.

ree

Create Index creates the indexes based upon the usage and is advanced version of missing index feature in SQL Server. It created indexes only when the load is less on the Azure SQL Database.


Drop Index as explained in the above screenshot drops the indexes which are not used since last 90 days.


Force Last Good Plan is similar to the Force query plan in Query Store and so Azure monitors and choose a best plan for the query automatically based upon query history and cached plans.


Below are the default options enabled for automatic tuning.

ree
Automatic tuning can be enabled from the Logical SQL Server or even from the database level.

To enable it using T-SQL use the below command.

ALTER DATABASE current SET AUTOMATIC_TUNING = AUTO | INHERIT | CUSTOM

ALTER DATABASE current SET AUTOMATIC_TUNING (FORCE_LAST_GOOD_PLAN = ON, CREATE_INDEX = ON, DROP_INDEX = OFF)

That's all in this post. If you liked this blog and interested in knowing more about Azure, Please Like, Follow, Share & Subscribeto www.ImJhaChandan.com.

Comments


jc_logo.png

Hi, thanks for stopping by!

Welcome to my “Muse & Learn” blog!
Muse a little, learn a lot.✌️

 

Here you’ll find practical SQL queries, troubleshooting tips with fixes, and step-by-step guidance for common database activities. And of course, don’t forget to pause and muse with us along the way. 🙂
 

I share insights on:​​

  • Db2

  • MySQL

  • SQL Server

  • Linux/UNIX/AIX

  • HTML …and more to come!
     

Whether you’re just starting out or looking to sharpen your DBA skills, there’s something here for you.

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • X
2020-2025 © TechWithJC

Subscribe to Our Newsletter

Thanks for submitting!

  • Facebook
  • Instagram
  • X

2020-2025 © TechWithJC

bottom of page