One sql processes using more than 600 threads

Mukesh Gupta 1 Reputation point
2022-01-18T05:34:23.337+00:00

Looking at sp_who2, there is a single process with 600 rows in it and other process are waiting for it to finish.

Is there any way I can limit the maximum number of threads a process can use in Sql Server 2016

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,583 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2022-01-18T09:19:18.387+00:00

    Hi MukeshGupta-1553,

    there is a single process with 600 rows in it and other process are waiting for it to finish.

    Do you mean a running query that takes a long time to execute is blocking other processes?
    If so, the solution to this type of blocking problem is to look for ways to optimize the query.
    After verifying that the correct indexes exist, and that there are no hints limiting the optimizer's ability to generate an efficient plan, you can examine the query execution plan.
    Please refer to Troubleshoot slow-running queries which might help.
    You can also use Query Store, which gives you insight into query plan choices and performance.

    Best Regards,
    Amelia


    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".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Mukesh Gupta 1 Reputation point
    2022-01-18T09:25:49.067+00:00

    Yes a single query but my question is if I can limit the number of parallel threads a query can use.

    It's a third party database so I don't have much control over changing their code or redesigning indexes.