Allocating DB costs

Admin eSMMS.tech 20 Reputation points
2025-02-18T14:40:39.4633333+00:00

My desktop app (in development) is using an Azure SQL DB to store shared content. I want to allocate costs for storage and compute time for each client based on their usage.

I think I understand how I can calcualte the storage costs, but am not sure about computing costs.

Can computing costs be calculated for a single query/update statement?

Also, is there a procedure for controlling usage from a single IP (malicious or otherwise)?

Thanks....

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Amira Bedhiafi 28,766 Reputation points
    2025-02-18T21:52:59.79+00:00

    Storage costs are typically based on the amount of data stored in your database. You can monitor this using Azure's built-in metrics and then allocate costs based on each client's data usage.

    Compute costs in Azure SQL Database are primarily based on the Database Transaction Unit or vCore model you are using. These models determine the amount of CPU, memory, and I/O resources allocated to your database.

    You can use Azure Query Performance Insight tool to monitor and analyze the performance of individual queries.

    Use DMVs like sys.dm_exec_query_stats if you want to ge detailed information about query execution, including CPU time, logical reads, and elapsed time.

    Also, Azure provides metrics such as CPU percentage, Data IO percentage, and Log IO percentage. These can be used to estimate the compute usage of your queries.

    To control or restrict access from a specific IP address, you can use :

    • Firewall Rules
    • Virtual Network Rules
    • Threat Detection

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.