I use VS2015 to build my database project in release mode and then copy the generated .dacpac file to my production server.
I am then running a command as follows:
sqlpackage.exe /action:publish /targetconnectionstring:"Data Source=localhost;Integrated Security=True;Initial Catalog=NorthwindDb" /sourcefile:"c:\temp\NorthwindDb.dacpac" /p:CreateNewDatabase=false
The dacpac size is around 8kb. It contains maybe 10 tables and some static data.
Then I run the command, it takes a really long time to run. Both for creating the initial database and for any upgrades. I estimate for this small database, running the above command takes around 5 minutes.
Is there a way I can improve the speed of this at all?
Certainly during the intial roll out of my application where I will be making small changes and deploying, this time delay will become a real hindrance.
When I finished my deployment pipeline and started running SqlPackage as part of my AWS Code Deploy scripts it (for some reason) runs a lot faster.
This must be something to do with running it on the command prompt however that is at this time unexplained.