When I execute a complex query from the cloud windows VM using SQL Server Management Studio(this vm is in the same VPC as SQL Server), it always takes on average 35s. When I execute the same query from the same machine using DBeaver it takes 1.5s on average. Tried connecting with SQL Proxy, nothing changed.
Hello,
Did you follow our quickstart about how to use SSMS with Cloud SQL and were not able to get it working properly? If you have made sure that steps were followed properly, and you are still not able to connect to your instance, I would recommend you to contact GCP support as they would be able to work with you to find out what’s the issue.
In general, Cloud SQL is designed for stability over performance. If you are using MySQL, you can actually enable a flag called performance_schema. I would also make sure the instance is not being overwhelmed and in the same region as the VM. This is also a good subject to discuss with GCP support as they may advise you on things you can try to gain some performance on your instance depending on their analysis of your specific instance. However, a local server, on average, will execute queries faster.