Hi @123rai456 , welcome to Microsoft Q&A forum.
There are multiple factors that influence the time to connect to server like which region are we connecting to, proximity of those regions with respect to the application from which we are connecting it from, application is deployed locally on system or on Azure, bandwidth of network etc.
I have done a basic test of connecting a local app with Azure SQL Database in 2 regions.
One was to East US region which is far from my local working area (India) and I observed the same connect time of approx. 3 seconds:
Second was in region in central India which only took less than a second to connect to:
Again this is when I was trying to connect to Azure SQL from my local app. If I deploy my application to Azure in same region as my Azure SQL Database is, this time will further reduce to a significant value.
Please let us know if this helps or else we can discuss further.
----------
If answer helps, please mark it as 'Accept Answer'