Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sql Azure - Timeout on query

I have setup an Azure website with a SQL Server Azure back-end. I used a migration tool to populate a single table with 80000 rows of data. During the data migration I could access the new data via the website without any issues. Since the migration has completed I keep getting a exception: [Win32Exception (0x80004005): The wait operation timed out].

This exception suggests to me that the database queries I am doing are taking more than 30 seconds to return. If I query the database from Visual Studio I can confirm that the queries are taking more than 30 seconds to return. I have indexes on my filter columns and on my local SQL database my queries take less than a second to return. Each row does contain a varchar(max) column that stores json which means that a bit of data is held in each row, but this shouldn't really affect the query performance.

Any input that could help me sole this issue would be much appreciated.

like image 523
Andrew Avatar asked Mar 12 '26 21:03

Andrew


1 Answers

I seem to be around the query timeout issues for now. What appeared to do the trick for me was to update the SQL Server stats.

EXEC sp_updatestats;

Another performance enhancement that worked well was to enable json compression on my azure website. See: enter link description here

like image 146
Andrew Avatar answered Mar 16 '26 00:03

Andrew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!