Sql-server – How query execution time and concurrent users affect DTU

azure-sql-databasesql server

I am using Azure SQL database. In Azure, pricing is calculated on the basics of DTU (Database Throughput Unit). There are lots of articles and QA regarding this but I failed to find the Steps for calculation of DTU or what are the factors affecting DTU. If I know the calculation steps, I can make changes in my codes or queries so that I can utilize the resource in a good manner.

Whether the following factors are affecting DTU?

  1. Volume of data in the DB
  2. Volume of data that we are fetching;
  3. Type of joins?
  4. Concurrent users/Hits

Azure Pricing Table:

enter image description here

Best Answer

As I understand it, the concept of DTUs is deliberately a bit vague. From the same page the graphic in the question came from:

SQL Database service tiers

Understanding DTUs

The Database Throughput Unit (DTU) is the unit of measure in SQL Database that represents the relative power of a database to process transactions given the constraints of the hardware driving the database. DTU is a concept similar to horsepower in a car. It describes the relative performance of one database to another. Just like with horsepower in a car, the more DTU a database has, the more power it has. Horsepower is a function of many different factors: weight, engine capacity, turbo, exhaust system. Similarly, DTU is a function of the amount and type of memory, compute, and disk the database can consume. You can read the details of how we determine DTU in the Benchmark Overview).

(emphasis added)

There are more details about how to monitor your usage and decide on an appropriate tier in the links above, the rest of the official documentation, and the Azure SQL Database blog.