make the sql query faster. ReadSniSyncOverAsync() is waiting for a packet response from the sql server (result set). apparently the SQL Server does not return a result set until after performing a lot of work.
How to fix slower performance with Microsoft.Data.SqlClient.TdsParserStateObject ReadSniSyncOverAsync method?
How to fix slower performance with Microsoft.Data.SqlClient.TdsParserStateObject ReadSniSyncOverAsync method when it has multiple calls (21) in a transaction with average execution time of 6116 ms per call and totalling to 128436 ms?
2 answers
Sort by: Most helpful
-
-
MikeyQiaoMSFT-0444 3,190 Reputation points
2024-06-14T09:51:12.2266667+00:00 Hello, ShahSamir-9495
due to insufficient information, we are unable to analyze the specific execution process.
You need to perform a stack trace on the client side and conduct performance analysis on the SQL Server side. You can choose Profiler or XEvent to filter out long-running transactions and troubleshoot deadlocks and blocking issues.
There are many factors affecting performance, including but not limited to: server performance (CPU, I/O), network status, switching to asynchronous methods, whether indexes are properly established, and whether statistics are updated.
You can refer to this blog:https://www.red-gate.com/simple-talk/blogs/identifying-client-timeouts/
Best regards,
Mikey Qiao
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".