-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The total execution time of SqlPackage (DacFx) publish is overly dependent on SQL Server network latency. #549
Comments
Can you share an example of the query executed? |
Hello, here are publish test files here is sample output from SQLPackage: Here is screen from Azure Data Studio: Is there anything else you need? Sincerely, |
Yeah, DacFX to be open source 😆 - but thanks for the detailed repro |
@PetrPospisil what is the maxdop? and how many vCore you db has? here's some recommendations: Compute Utilization can be viewed on Azure portal under Overview --> Monitoring. This will help to see the database resource utilization while export is in-progress and accordingly allocate required resources to Azure Sql like vCores or memory. |
Hello, |
Steps to Reproduce:
Did this occur in prior versions? If not - which version(s) did it work in?
Not version related.
(DacFx/SqlPackage/SSMS/Azure Data Studio)
DacFx and SqlPackage.
Hi,
We have encountered a performance issue with SQLPackage (DacFx) when publishing a DACPAC containing a large number of SQL objects (approximately 3,000 tables, constraints, procedures, etc.) to an empty database. We tested this on the WUS3 and WE data centers.
Observations:
When running SQLPackage Publish on an Azure SQL Server with a 1 ms ping (a virtual machine in the same data center as the Azure SQL Server), the deployment of the DACPAC takes approximately 1 minute and 30 seconds.
When running SQLPackage Publish on an Azure SQL Server with a 30 ms ping (e.g., from my PC in Central Europe publishing to an Azure SQL Server in the WE data center), the deployment takes approximately 4 minutes.
When running SQLPackage Publish on an Azure SQL Server with a 140 ms ping (e.g., a virtual machine in the WE data center publishing to an Azure SQL Server in the WUS2 data center, or vice versa), the deployment takes approximately 20 minutes.
Root Cause:
We identified the issue within DacFx during the execution of the generated publish script. For each database object, a request is sent to the SQL Server (140 ms) and a error is checked (140 ms). This process occurs sequentially in a single thread, without any batching of operations.
This approach significantly increases the total execution time. In our worst-case scenario, with 3,000 objects, the estimated additional time is:
3,000objects×(140msrequest+140mserrorcheck)= 14minutes
Request for Advice:
We hope this provides a clear understanding of the issue. Is there any advice or optimization we could try to speed up the DACPAC deployment process?
Thank you!
Sincerely,
PP
The text was updated successfully, but these errors were encountered: