Hi
WisonHii •,
Thanks for posting this question in Microsoft Q&A forum.
As we understand, you want to know value difference between DTU over portal and with DMVs.
The data returned by sys.dm_db_resource_stats
is expressed as a percentage of the maximum allowed limits for the service tier/performance level that you are running.
If the database was failed over to another server within the last 60 minutes, the view will only return data for the time since that failover.
For a less granular view of this data with longer retention period, use the sys.resource_stats
catalog view in Azure SQL Database, or the sys.server_resource_stats
catalog view in Azure SQL Managed Instance. This view captures data every 5 minutes and maintains historical data for 14 days. For more information, see sys.resource_stats or sys.server_resource_stats.
The DTU limit of a database is determined by CPU, reads, writes, and memory available to the database. However, because the SQL Database engine typically uses all available memory for its data cache to improve performance, the avg_memory_usage_percent
value will usually be close to 100 percent, regardless of current database load. Therefore, even though memory does indirectly influence the DTU limit, it is not used in the DTU utilization formula.
Reference: DTU Model
Hope this helps.
Please share the differences noticed by you in the form of screenshots so that we can look into it and assist further.
Thank you.