Learn why you should monitor your connections in Azure SQL | SelectStar

5 Steps to Optimize Azure SQL Performance

With approximately 85% of today’s enterprises using a hybrid cloud strategy, Microsoft Azure SQL rises to the top as a clear solution to meet the different demands from on-premises database solutions, as well as those that are hosted in the cloud.

Unpredictability and cost restraints can make it challenging to create an Azure SQL environment that meets your unique requirements for your databases. In this blog post, I’ll cover five key steps you can leverage to optimize Azure SQL performance.

1. Tune your queries

Perhaps the most obvious step to optimize Azure SQL performance comes from taking a look at your query data and understanding how they are performing. Are your queries taking a long time? Can you add an index to optimize?

Reviewing your queries can give you immediate insight that  drives better performance of your Azure SQL workloads. In addition, ancillary metrics like CPU usage and projected CPU usage can give you insight into whether you need to parameterize your queries to drive better performance.

2. Use elastic pools

Database workloads are unpredictable, which oftentimes results in over provisioning of resources. Over provisioning can significantly drive up your costs, but can often seem like the only strategy to ensure that your database performance doesn’t falter even when demand rises.

Elastic pools within Azure SQL offer an easy solution to maximize your capacity without over provisioning and draining your budget in the process. Instead of relying on Database Transaction Units (DTUs), invest in Elastic DTUs (eDTUs), which can be shared across a set of databases on an Azure SQL Server. In the event that one database goes over capacity, it can borrow the eDTU from another database that is underutilized.

 

3. Manage your groups

The Azure Resource Manager (ARM) serves as one of the best features within Azure SQL. Because your infrastructure consists of many components, such as a virtual network, database, storage account, virtual machine, it can be time consuming to manage these all separately. With the ARM, you have the ability to group these together. When you initiate an action, whether it’s deployment or an update, it automatically applies to everything that you have in the group, rather than having to apply individually.

In addition, when you are monitoring the performance of your Azure SQL workloads, you have visibility at the group level, as well as the ability to drill down to the specific component that you want to track. In doing so, you can compare performance across your groups, and if any are lacking, understand which component may be causing issues.

 

4. Monitor your indexing

Indexing exists to improve how your queries perform. If you monitor your index performance closely, you can get a first indication that something may be off with how your queries are performing.

Since SQL databases rely on tables to organize data, you can create an index so that when you perform a query, it only looks at data within the subset of the table that you specify. Without an index? It’s looking at the entire table, which slows your queries and in turn, makes your performance suffer.

Within indexing, take a look at the recommendations that are native to Azure SQL — including create index and drop index recommendations. Both of these provide insight into how well your indexing is working, and where you can improve to speed up your queries.

5. Understand your connections

Azure SQL has resource limits — and if you aren’t monitoring how you are actually using your resources, you can find yourself without the resources you need to support your workloads. Azure SQL does a good job enforcing limits, so you are limited to the number of connections to a SQL database and the number of concurrent requests. This is also directly related to the tiered pricing for Azure SQL. Beyond performance, it offers financial benefit to understand your connections and how you can clean them up.

In reviewing your connections, you can see if there are any unused connections that are bogging down your Azure SQL workloads. Pinpointing what these are and removing them from your environment helps you quickly tune your Azure SQL resources to optimize future performance within the constraints defined by the system.

 

How SelectStar Can Help

Drive database performance monitoring for your Azure SQL workloads with SelectStar, which offers in-depth monitoring across your Azure SQL environment.

Example of the connections dashboard in SelectStar | SelectStar
Figure 1: Example of a SelectStar dashboard tracking active connections in your Microsoft SQL Azure environment

 

In addition to a comprehensive set of dashboards, reports and advanced analytics, SelectStar offers intelligent alerts and expert recommendations to take your monitoring to the next level — bringing in industry best practices to optimize your solution’s performance today and in the future.

Interested in seeing SelectStar in action? Get a free trial today.

LET'S GET STARTED!

Try SelectStar for 14 days. No credit card required.

TRY IT NOW!