Daily runtime hours of Synapse Workspace

Prabhu 60 Reputation points
2025-03-25T04:52:54.37+00:00

I would like to analyze the daily runtime hours and associated costs for our Azure Synapse workspace. Specifically, I want to understand the total number of hours the workspace runs each day and the corresponding cost per run.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,294 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ganesh Gurram 6,040 Reputation points Microsoft External Staff
    2025-03-25T07:14:02.2133333+00:00

    @Prabhu

    To analyze the daily runtime hours and associated costs of your Azure Synapse workspace, follow these steps:

    Understanding Synapse Workspace Usage - Azure Synapse Analytics costs depend on:

    Compute Resources - Dedicated SQL pools (billed per active hour), Spark pools, and serverless SQL (billed per query).

    Storage Costs - Charges for data stored in Synapse.

    Data Movement - Costs incurred when transferring data in/out.

    Tracking Runtime Data - To track daily runtime hours, use Azure Monitor and Azure Activity Logs:

    Azure Monitor - Logs SQL pool start/stop times.

    Activity Logs - Check when the pool was active.

    KQL Query to Track SQL Pool Activity in Log Analytics

    AzureDiagnostics
    | where ResourceType == "DATABASES"
    | where Resource == "<Your-SQL-Pool-Name>"
    | project TimeGenerated, Resource, OperationName, ActivityStatus
    

    This query helps identify start/stop events to calculate daily runtime.

    Calculating Daily Runtime Hours

    Dedicated SQL Pools - Sum up the duration between start and pause events.

    Serverless SQL Pools - Monitor query execution time (no continuous runtime).

    Estimating Costs

    Use Azure Cost Management + Billing to filter Synapse costs by date.

    Formula:

    Total Cost=Runtime Hours×Cost per Hour\text{Total Cost} = \text{Runtime Hours} \times \text{Cost per Hour}Total Cost=Runtime Hours×Cost per Hour

    User's image

    https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/pricing-calculator

    https://learn.microsoft.com/en-us/azure/azure-monitor/logs/log-query-overview

    https://learn.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/monitor-sql-pool-synapse-analytics

    I hope this information helps.

    Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues. 

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.