成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

Scheduler&Task&Worker&Thread&Request&Session&ConnectionOFMSSQL

MSSQL一直以來被人們認(rèn)為簡(jiǎn)單、好學(xué),但等到大家掌握了入門操作,深入理解起來又覺得非常的“擰巴”,尤其是對(duì)用慣了Oracle的同學(xué)來說,究其根本原因,無非是MSSQL引入和暴露了太多的概念、細(xì)節(jié)和理論層,而Oracle恰恰屏蔽了這些,比如下面講到的這些概念,即使是使用很久MSSQL的同學(xué)來說,也未必就真理解的正確,下面這段文字,很好的解釋了MSSQL中的幾個(gè)基本概念:

Scheduler (SOS Scheduler)– the object that manages thread scheduling in SQL Server and allows threads to be exposed to the CPU (described in sys.dm_os_schedulers). This is the all-powerful but benign and graceful master whom everyone abides.  He does not control things but lets the workers work with each other and relies on their cooperation (co-operative scheduling mode). Each scheduler /master (one per logical CPU) accepts new tasks and hands them off to workers. SOS Scheduler allows one worker at a time to be exposed to the CPU.


Task –a task represents the work that needs to be performed (sys.dm_os_tasks). A task contains one of the following requests: query request (RPC event or Language event), a prelogin request (prelogin event),  a login request (connect event), a logout request (disconnect event), a query cancellation request (an Attention event), a bulk load request (bulk load event), a distributed transaction request (transaction manager event). A task is what the Master is about – it is what defines its existence. Note these are tracked at the SOS scheduler layer (thus dm_OS_tasks)


Worker (worker thread) – This is the logical SQL Server representation of a thread (think of it as a wrapper on top of the OS thread). It is a structure within the Scheduler which maintains SQL Server-specific information about what a worker thread does. sys.dm_os_workers. Workers are the humble servants who carry out the task assigned to them by the Master (scheduler).


Thread – this is the OS thread sys.dm_os_threads that is created via calls like CreateThread()/_beginthreadex(). A Worker is mapped 1-to-1 to a Thread.


Request is the logical representation of a query request made from the client application to SQL Server (sys.dm_exec_requests). This query request has been assigned to a task that the scheduler hands off to a worker to process. This represents query requests as well as system thread operations (like checkpoint, log writer, etc); you will not find login, logouts, attentions and the like here. Also, note that this is a representation at the SQL execution engine level (thus dm_EXEC_requests) not at the SOS Scheduler layer.


Sessions – when the client application connects to SQL Server the two sides establish a "session" on which to exchange information. Strictly speaking a session is not the same as the underlying physical connection, it is a SQL Server logical representation of a connection. But for practical purposes, you can think of this as being a connection (session =~ connection). See sys.dm_exec_sessions. This is the old SPID that existed in SQL Server 2000 and earlier. You may sometimes notice a single session repeating multiple times in a DMV output. This happens because of parallel queries. A parallel query uses the same session to communicate with the client, but on the SQL Server side multiple worker (threads) are assigned to service this request. So if you see multiple rows with the same session ID, know that the query request is being serviced by multiple threads.


Connections – this is the actual physical connection established at the lower protocol level with all of its characteristics sys.dm_exec_connections . There is a 1:1 mapping between a Session and a Connection.tr

創(chuàng)新互聯(lián)公司于2013年成立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計(jì)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元懷化做網(wǎng)站,已為上家服務(wù),為懷化各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18982081108

網(wǎng)頁標(biāo)題:Scheduler&Task&Worker&Thread&Request&Session&ConnectionOFMSSQL
網(wǎng)頁鏈接:http://jinyejixie.com/article22/ghhdcc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)微信小程序、全網(wǎng)營(yíng)銷推廣、面包屑導(dǎo)航電子商務(wù)、定制網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名
剑阁县| 原阳县| 盱眙县| 伊通| 营口市| 兴城市| 邳州市| 登封市| 四子王旗| 邵武市| 当涂县| 镇宁| 双流县| 大洼县| 温宿县| 长宁区| 温泉县| 涟水县| 泸西县| 阜宁县| 安阳县| 怀集县| 曲松县| 伊金霍洛旗| 雅江县| 永平县| 贡觉县| 吉木萨尔县| 南投县| 三都| 庄河市| 土默特左旗| 平湖市| 芜湖市| 恭城| 墨玉县| 田东县| 临颍县| 梨树县| 玛纳斯县| 贵港市|