Azure Database Size and .bacpac Imports
This is an anecdotal recording of a quick series of tests and is not a comprehensive experiment or thorough examination. I don’t have the money for that.
Importing a 9GB .bacpac File
A test database can be quickly setup by importing a .bacpac file into an Azure SQL server. I have a 9GB bacpac stored in Azure blob storage and in the same region I have an Azure SQL server.
When I’m running a database for testing and development purposes, I will quite often be running at the S0 size. The smallest standard size (S0) runs about $15 per month and is affordable even if I forget that I left it running.
Don’t Import at S0 If You Don’t have All Day
An import of a 9GB bacpac to S0 database takes 18 hours to complete. On the upside it costs you approximately $0.36 in that time.
Size |
S0 |
S3 |
P1 |
S7 |
P6 |
S12 |
After the 18 hour database import completed I tried the import a few more times in succession at different database sizes to check out the tradeoff between speed and spend. I won’t venture to guess if the time to import scales linearly with bacpac size. I will, however, share with you the relative speed and monetary cost to import the 9GB bacpac across different instance sizes.
The relative benefit of running the import on a larger instance comes pretty quickly, with the S3 and P1 imports taking far less time than the S0 import.
I understand we’re talking about the difference between $1.88 and $0.36, but there is a price impact and that is soley during the database import. If you forget to resize your database down to S0 you’re on the hook for more.
Time vs Money
I don’t have a definite answer for which size for future imports I would use because it would largely depend on how much time I have. As a thrifty guy, I look at the $7+ imports and would rather wait the extra 1-1.5 hours to save $4.
One thing’s for sure – unless I have planned ahead by at least a day, I won’t be importing at S0.