How to fix slower performance with Microsoft.Data.SqlClient.TdsParserStateObject ReadSniSyncOverAsync method?

ShahSamir-9495 0 Reputation points
2024-06-13T09:10:47.4366667+00:00

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?

User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,921 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,998 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 66,706 Reputation points
    2024-06-13T18:09:31.3866667+00:00

    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.

    0 comments No comments

  2. 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".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.