Parallel Query Processing

來源:互聯網
上載者:User

有時我們會在sysprocesses中看到很多duplicate SPID,但是有著不同的KPID。

spid   kpid------ ------55     376055     368455     595655     3680

55     3260

這篇文章解釋了這個現象:

http://www.sqlservertorque.net/2010/09/does-spid-unique-in-syssysprocesses.html

其中這句話有點意思:KPID is Windows thread id. Each SQL Server task is assigned a Windows thread.

相關的Parallel Query Processing官文:

http://msdn.microsoft.com/en-us/library/ms178065%28v=sql.105%29.aspx

SQL Server provides parallel queries to optimize query execution and index operations for computers that have more than one microprocessor (CPU). Because SQL Server can perform a query or index operation in parallel by using several operating system threads,
the operation can be completed quickly and efficiently.

The actual number of threads used by a parallel query is determined at query plan execution initialization and is determined by the complexity of the plan and

the degree of parallelism.The degree of parallelism value is set at the server level and can be modified by using the
sp_configure system stored procedure. You can override this value for individual query or index statements by specifying the MAXDOP query hint or MAXDOP index option.

這裡有另外一篇文章解釋MAXDOP:

http://blogs.msdn.com/b/sqlserverfaq/archive/2009/01/05/why-do-i-see-more-threads-per-spid-in-sysprocesses-than-maxdop.aspx

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.