question

Laco-8699 avatar image
0 Votes"
Laco-8699 asked KalyanChanumolu-MSFT answered

Azure database first query slow

This is database for testing without any backend connected to it!

Tested from SSMS

First Query after few hours of inactivity (Execution time is 3min)
89115-firstrun.png

Same Query second time (Execution time is 12 sec) !!!!
89095-secondrun.png

Same question I posted on stackoverflow...

https://stackoverflow.com/questions/67070819/azure-sql-timeouts-for-first-request-after-some-period

Do you have any advice other than going to a higher paid tier?


azure-sql-database
firstrun.png (109.2 KiB)
secondrun.png (104.3 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Laco-8699 Thank you for reaching out.
Could you please check if you are using Azure SQL Serverless pricing tier?

89143-image.png


0 Votes 0 ·
image.png (57.6 KiB)
image.png (57.6 KiB)

No, we have 10DTU, 250GB database without any auto pause options..

0 Votes 0 ·

1 Answer

KalyanChanumolu-MSFT avatar image
0 Votes"
KalyanChanumolu-MSFT answered

@Laco-8699 It seems like your SSMS session is getting disconnected after a period of inactivity.
It needs to establish the connection first before executing the query resulting in longer overall duration.
Also, I notice that Execution Plan is included with the results, turning it OFF will improve execution time


If an answer is helpful, please "Accept answer" or "Up-Vote" which might help other community members reading this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.