Reputation: 173
Is it true that one query is one transaction in Azure SQL DTU? that mean is my basic package has 5 DTU it won't execute more than 5 quires in one second?
I am wondering how much DTU it will take to execute a query where sub query runs 1,000 times.
Upvotes: 0
Views: 829
Reputation: 294187
As other have already indicated, the DTU does not reflect queries per second. I recommend you enable SQL Azure Query Performance Insight which will allow you to track DTU usage and identify the top DTU consuming queries.
Also, there is no such concept as a 'sub-query' in execution. There is only the 'query'. If your query contains 'sub-queries' they are nothing more than just parts of the 'query' and in the end there is one query being executed. Your query components (sub-queries, scalar or table valued functions, CTEs, 'lateral views' etc etc ) are all just parts of the one query, and there is one query being executed, no matter how many components it has and how often their operators get invoked. Some queries consume more DTUs than other, but the relation between query text complexity and query execution complexity/cost is not straightforward. Please read Understanding how SQL Server executes a query for a deeper discussion on this topic.
Upvotes: 1
Reputation: 1445
No, this is not the amount of queries per second.
It is rather a bit of a blackbox calculation based on:
there is however a calculator that helps you defining the correct amount of dtu's you consume on: http://dtucalculator.azurewebsites.net/
Upvotes: 2
Reputation: 2267
DTU, abbreviation for Database Throughput Unit, is involved with multiple factors including CPU, Memory, reads and writes. Not just queries per seconds or transactions at a time.
There is a calculator for you to measure your on-premise database, if you want to migrate it to Azure SQL database.
And, there is an test for Azure SQL Database Benchmark with different Service Tier/Performance Level
Upvotes: 2