Forum Discussion
About Azure SQL Database
- Aug 31, 2023
So, there's two states which mean different things for the compute resources (CPU and memory):
- The SQL "serverless" service is running;
- The SQL "serverless" service is stopped (which is called "auto-paused").
The SQL service is running
- This is like when a computer is switched on, meaning you are paying for using CPU, memory and storage;
- If the SQL workload is light, the amount of memory and CPU will likely be towards the lower value limits you entered on the configuration page, which translates into a lower bill when it comes time to pay (since you only pay based on utilisation);
- If the workload is busy, the amount of memory and CPU will likely be towards the upper limits you entered on the configuration page;
- If there's no SQL workload at all for the timeframe specified as the "duration" on the configuration page, then the SQL "serverless" service is stopped (called "auto-paused").
The SQL service is stopped (auto-paused)
- This is like when you shut down a computer;
- CPU and memory are no longer being used as the SQL instance is effectively "switched off";
- This means you are saving money, as Microsoft isn't billing you for CPU or memory as the SQL instance is "switched off";
- You are still charged for storage while the instance is switched off;
- You don't have to "turn the SQL instance back on" again, as that will happen automatically once any kind of workload tries using the SQL instance again (although there will be a delay and things will run a bit slower for a short while after it starts itself back up again).
Cheers,
Lain
The duration is a window of time in which the database will be auto-paused if the following two conditions are true for the full duration of that window:
- Number of sessions = 0; and
- CPU = 0 for user workloads.
So, if you had a really short duration value of 3,600 (one hour), then if the number of sessions remains at zero for an hour, and the user CPU utilisation also remains at 0 for that hour, the database will be auto-paused.
Cheers,
Lain
Thanks LainRobertson
¿What about the other two options? That is CPU Used and Memory Used. I get confused with these two, because we are talking about a scaling serverless tier that in theory doesn't have provisioned a fixed CPU or Memory
Best regards