Share via

My Sql costs are very high for what is hundreds of rows of data that is only accessed by one user for a few hours a day

Vic Johnston 40 Reputation points
2026-02-03T23:33:21.5366667+00:00

I have 100,000 free seconds and they have been used up in 2 days. How can I see why that is and resolve it?
I have this setup, used space is 118mb, my compute utilization in the last 7days has not averaged more than 0.3%
Free - General Purpose - Serverless: Gen5, 2 vCores

THe top 5 queries in the last 24 hours have not even managed to raise up to 0.01% of CPU consumption

I do not believe I have any extensive features switched on, no expensive backup plans. What are the likely causes because this is completely unaffordable!

Cost Management
Cost Management

A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.

0 comments No comments

Answer accepted by question author

Suchitra Suregaunkar 14,085 Reputation points Microsoft External Staff Moderator
2026-02-04T04:13:37.9566667+00:00

Hello Vic Johnston Thank you for posting your query on Microsoft Q&A platform. Thanks for sharing the details. Based on your description, this behavior is expected for Azure SQL Database – General Purpose (Serverless) and is not caused by query load, data size, or backups.

Azure SQL serverless is billed based on vCore‑seconds while the database is online, not on CPU percentage alone.

Even if CPU usage is very low (for example, 0.01%), vCore seconds continue to be consumed as long as the database remains active and does not auto‑pause. With the free offer, each database includes 100,000 vCore‑seconds per month, which can be exhausted quickly if the database stays online continuously.

  • The free offer includes 100,000 vCore‑seconds of serverless compute per month.
  • Compute charges stop only when the database is paused.

Reference: https://learn.microsoft.com/en-us/azure/azure-sql/database/free-offer?view=azuresql

Auto‑pause didn’t kick in due to below reason:

Auto‑pause in serverless only triggers when BOTH conditions are true during the auto‑pause delay:

  1. Number of active sessions = 0
  2. CPU usage = 0

If any connection remains open (for example, SSMS, Azure Data Studio, Object Explorer, application connection pools, or health probes), the database will not pause and will continue consuming vCore seconds even with near‑zero CPU.

This is the most common reason for unexpected cost in serverless databases.

To verify what’s preventing auto‑pause: If auto-pausing is enabled and features that block auto-pausing are not used, but a database does not auto-pause after the delay period, then application or user sessions might be preventing auto-pausing.

To see if there are any application or user sessions currently connected to the database, connect to the database using any client tool, and execute the following query:

SELECT session_id,
       host_name,
       program_name,
       client_interface_name,
       login_name,
       status,
       login_time,
       last_request_start_time,
       last_request_end_time
FROM sys.dm_exec_sessions AS s
INNER JOIN sys.dm_resource_governor_workload_groups AS wg
ON s.group_id = wg.group_id
WHERE s.session_id <> @@SPID
      AND
      (
          (
          wg.name like 'UserPrimaryGroup.DB%'
          AND
          TRY_CAST(RIGHT(wg.name, LEN(wg.name) - LEN('UserPrimaryGroup.DB') - 2) AS int) = DB_ID()
          )
      OR
      wg.name = 'DACGroup'
      );


Important: After running the query, disconnect immediately. Even the session used for troubleshooting can prevent auto‑pause.

Reference: https://learn.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview?view=azuresql&tabs=general-purpose#auto-pause-and-auto-resume

Instead of relying on CPU %, Microsoft recommends monitoring the “Free amount remaining” metric. This shows how fast vCore seconds are being consumed and confirms whether the database is staying online.

To avoid unexpected charges:

  • Ensure all client tools and applications fully disconnect when idle
  • Verify auto‑pause is enabled and no sessions remain open
  • Monitor the Free amount remaining metric regularly
  • If the database must stay online most of the time, consider switching to a provisioned compute tier, which provides more predictable and often lower cost for always‑on workloads

Reference: https://learn.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview?view=azuresql&tabs=general-purpose

Please let us know if the suggested resolution helped/ addressed your concern. If it did, we’d appreciate your feedback on the proposed resolution as it helps others with similar issues.

If you have any other questions or need further support, please feel free to contact us.

Thanks,
Suchitra.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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