{"id":1283,"date":"2010-08-01T22:52:40","date_gmt":"2010-08-01T21:52:40","guid":{"rendered":"http:\/\/blog.capdata.fr\/?p=1283"},"modified":"2023-01-04T08:50:38","modified_gmt":"2023-01-04T07:50:38","slug":"mythe-sql-server-associe-un-thread-a-chaque-connexion","status":"publish","type":"post","link":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/","title":{"rendered":"Mythe: SQL Server associe un thread \u00e0 chaque connexion"},"content":{"rendered":"<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1283&#038;text=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1283&#038;title=Mythe%3A%20SQL%20Server%20associe%20un%20thread%20%C3%A0%20chaque%20connexion\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Mythe%3A%20SQL%20Server%20associe%20un%20thread%20%C3%A0%20chaque%20connexion&#038;body=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20:%20https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1283\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a><p>C&#8217;est \u00e9videmment faux, mais il est facile de se m\u00e9prendre sur la question. Pourtant il existe une mani\u00e8re simple de le v\u00e9rifier. Sur une instance non-idle (avec de l&#8217;activit\u00e9), il suffit de r\u00e9cup\u00e9rer plusieurs fois de suite la valeur de os_thread_id associ\u00e9 \u00e0 sa propre connexion:<\/p>\n<pre><span style=\"color: #0000ff;\">select os_thread_id from sys.dm_os_threads T\r\ninner join sys.dm_os_workers W on W.worker_address = T.worker_address\r\ninner join sys.dm_os_tasks TA on TA.task_address = W.task_address\r\ninner join sys.dm_exec_requests R on R.session_id = TA.session_id\r\nwhere R.session_id = <span style=\"color: #ff00ff;\">@@spid<span style=\"color: #0000ff;\">;<\/span>\r\n<span style=\"color: #0000ff;\">GO<\/span><\/span><\/span><\/pre>\n<p>Vous verrez qu&#8217;il finit par changer, et pourtant la connexion n&#8217;a pas \u00e9t\u00e9 interrompue. L&#8217;explication r\u00e9side dans le mod\u00e8le de planification adopt\u00e9 par SQL Server depuis 1997 (la 7.0)<\/p>\n<h2>Tasks et Workers:<\/h2>\n<p>Dans SQL Server, la requ\u00eate SQL ou l&#8217;initialisation de la connexion est une <strong>t\u00e2che <\/strong>(<em>sys.dm_os_tasks<\/em>). Le porteur de l&#8217;ex\u00e9cution de la t\u00e2che est le <strong>worker<\/strong> (<em>sys.dm_os_workers<\/em>). L&#8217;id\u00e9e principale est la suivante: pour pouvoir supporter de nombreuses  ex\u00e9cutions de batches SQL, il faut dissocier la t\u00e2che  (task) de l&#8217;ex\u00e9cutant (worker), ce qui permet \u00e0 un m\u00eame worker d&#8217;ex\u00e9cuter plusieurs t\u00e2ches successivement. Si vous ouvrez deux connexions sur un syst\u00e8me idle, et que dans chaque session vous ex\u00e9cutez la requ\u00eate ci-dessus, vous avez des chances de tomber sur le m\u00eame os_thread_id, c&#8217;est la preuve que le worker est dissoci\u00e9 de la session ou de la t\u00e2che \u00e0 ex\u00e9cuter. L&#8217;objectif est de maintenir un worker en ex\u00e9cution tant qu&#8217;il reste des choses \u00e0 faire.<\/p>\n<h2>Organisation des workers:<\/h2>\n<p>Les workers sont regroup\u00e9s par scheduler (UMS ou SQLOS) dans un pool, dont la taille maximale est d\u00e9finie telle que =\u00a0 (max worker threads \/ nb of user schedulers). Au cours de l&#8217;ex\u00e9cution, les workers sont r\u00e9partis dans diff\u00e9rentes listes:<br \/>\n&#8211; <strong>worker-list<\/strong>:\u00a0 les workers y sont stationn\u00e9s au d\u00e9marrage de SQL Server. A cet instant l\u00e0, aucune t\u00e2che n&#8217;est arriv\u00e9e au moteur d&#8217;ex\u00e9cution.<br \/>\n&#8211; <strong>runnable-list<\/strong>:\u00a0 \u00e0 chaque nouvelle t\u00e2che qui arrive, un worker est pris dans la  worker-list, li\u00e9 \u00e0 la t\u00e2che et plac\u00e9 dans la runnable-list. Il est initialis\u00e9 en attente infinie sur un &#8216;<em>event<\/em>&#8216; priv\u00e9 en utilisant la primitive <em>WaitForSingleObject(). <\/em>L&#8217;event est un objet du noyau windows  qui sert comme un drapeau lev\u00e9 ou baiss\u00e9 \u00e0 signaler \u00e0 un worker qu&#8217;il  peut poursuivre son ex\u00e9cution. N&#8217;importe quel worker peut prendre n&#8217;importe quelle  t\u00e2che. La runnable-list est l&#8217;antichambre de l&#8217;ex\u00e9cution.<br \/>\n&#8211; <strong>waiter-list<\/strong>: lorsqu&#8217;une t\u00e2che doit attendre la fin d&#8217;une op\u00e9ration (la lib\u00e9ration d&#8217;une ressource comme un latch par exemple), elle est plac\u00e9e en waiter-list. C&#8217;est \u00e0 la charge du worker qui d\u00e9tient la ressource de lui indiquer que la ressource est lib\u00e9r\u00e9e.<br \/>\n&#8211; <strong>I\/O-list<\/strong>: toutes les t\u00e2ches en attente de retour d&#8217;une I\/O asynchrone sont cha\u00een\u00e9es dans cette liste. C&#8217;est le worker  qui rend la main qui ex\u00e9cute les routines de completion d&#8217;I\/Os et qui replace ces workers dans la runnable-list ensuite (cf  section suivante).<br \/>\n&#8211; <strong>timer-list<\/strong>:\u00a0 g\u00e8re toutes les t\u00e2ches en attente de l&#8217;expiration d&#8217;un timer (comme une trace SQL avec une dur\u00e9e d&#8217;ex\u00e9cution&#8230;). Comme pour les workers en I\/O list, elles sont remises dans la runnable-list par le worker qui rend la main.<\/p>\n<h2>Cycle de l&#8217;ex\u00e9cution:<\/h2>\n<p>Lorsque c&#8217;est \u00e0 son tour, le premier worker dans la runnable-list se voit signaler son event par le worker qui rend la main (= yield), et il peut passer en ex\u00e9cution. A son tour ensuite, il va ex\u00e9cuter sa t\u00e2che plus un certain nombre de sub-routines comme par exemple v\u00e9rifier la liste des I\/Os asynchrones en attente et lancer les routines de completion d&#8217;I\/Os, v\u00e9rifier la liste des workers en attente d&#8217;\u00e9veil en timer list, et v\u00e9rifier l&#8217;expiration de certains timers, enfin signaler l&#8217;event du worker en t\u00eate de runnable-list et se replacer en worker-list en attendant une nouvelle t\u00e2che \u00e0 ex\u00e9cuter.<\/p>\n<p><a href=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2010\/08\/scheduling.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1333\" title=\"scheduling\" src=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2010\/08\/scheduling-300x221.png\" alt=\"\" width=\"300\" height=\"221\" srcset=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2010\/08\/scheduling-300x221.png 300w, https:\/\/blog.capdata.fr\/wp-content\/uploads\/2010\/08\/scheduling.png 766w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Si l&#8217;instance est peu sollicit\u00e9e, le m\u00eame worker peut se retrouver \u00e0 ex\u00e9cuter plusieurs batches diff\u00e9rents \u00e0 la suite en repassant par la worker-list, la runnable-list puis en ex\u00e9cution. C&#8217;est ce qui donne l&#8217;impression qu&#8217;une connexion\u00a0 est toujours sur le m\u00eame thread, alors que c&#8217;est juste parce que les autres workers n&#8217;ont rien \u00e0 faire de particulier et restent en worker-list. Il n&#8217;y a qu&#8217;un seul cas o\u00f9 un nouveau worker est cr\u00e9\u00e9 lorsqu&#8217;une nouvelle connexion arrive, c&#8217;est lorsque la worker-list est vide et que tous les workers sont r\u00e9partis dans les diff\u00e9rentes listes waiter, timer, I\/O ou runnable. Tant que la valeur de max worker threads n&#8217;est pas atteinte, SQL Server cr\u00e9\u00e9 un nouveau worker et le place avec la t\u00e2che de g\u00e9rer la nouvelle connexion en runnable-list, mais encore une fois, le worker n&#8217;est pas li\u00e9 \u00e0 la connexion. Une fois revenu en worker-list, il prendra une t\u00e2che en provenance d&#8217;une autre connexion.<\/p>\n<h2>En r\u00e9sum\u00e9:<\/h2>\n<p>Ce qu&#8217;il faut se dire, c&#8217;est qu&#8217;une instance n&#8217;a pas besoin de 1000 threads pour servir 1000 connexions simultan\u00e9es. De nombreuses connexions restent idle, et il est tr\u00e8s rare de devoir manuellement augmenter la valeur de max worker threads m\u00eame avec une tr\u00e8s forte activit\u00e9 et de nombreux utilisateurs. Quelques workers suffisent, et gr\u00e2ce \u00e0 son syst\u00e8me de planification coop\u00e9ratif, SQL Server peut absorber la charge ais\u00e9ment.<\/p>\n<p>En ce sens, la vision que renvoient les DMV sys.dm_exec_sessions et sys.dm_exec_connections est beaucoup plus consistante avec la r\u00e9alit\u00e9 que ne l&#8217;\u00e9tait sysprocesses. Une session en AWAITING COMMAND n&#8217;avait pas de thread associ\u00e9, c&#8217;\u00e9tait vaguement une instance de classe cha\u00een\u00e9e avec d&#8217;autres dans une liste.\u00a0 A partir de SQL Server 2005, seule sys.dm_exec_sessions est li\u00e9e aux tables de tasks, workers et threads. sys.dm_exec_connections reste \u00e0 part, ce qui avait tendance \u00e0 d\u00e9router au d\u00e9but mais qui au final s&#8217;av\u00e8re beaucoup plus logique.<\/p>\n<p>A+ David B.<\/p>\n<p><script src=\"https:\/\/tcr.tynt.com\/javascripts\/Tracer.js?user=d4FlbGI04r35lZadbi-bpO\" type=\"text\/javascript\"><\/script><\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1283&#038;text=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1283&#038;title=Mythe%3A%20SQL%20Server%20associe%20un%20thread%20%C3%A0%20chaque%20connexion\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Mythe%3A%20SQL%20Server%20associe%20un%20thread%20%C3%A0%20chaque%20connexion&#038;body=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20:%20https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1283\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>C&#8217;est \u00e9videmment faux, mais il est facile de se m\u00e9prendre sur la question. Pourtant il existe une mani\u00e8re simple de le v\u00e9rifier. Sur une instance non-idle (avec de l&#8217;activit\u00e9), il suffit de r\u00e9cup\u00e9rer plusieurs fois de suite la valeur de&hellip; <a href=\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\" class=\"more-link\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":7944,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[164,163,165],"class_list":["post-1283","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sqlserver","tag-sqlos","tag-thread","tag-worker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Mythe: SQL Server associe un thread \u00e0 chaque connexion - Capdata TECH BLOG<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mythe: SQL Server associe un thread \u00e0 chaque connexion - Capdata TECH BLOG\" \/>\n<meta property=\"og:description\" content=\"C&#8217;est \u00e9videmment faux, mais il est facile de se m\u00e9prendre sur la question. Pourtant il existe une mani\u00e8re simple de le v\u00e9rifier. Sur une instance non-idle (avec de l&#8217;activit\u00e9), il suffit de r\u00e9cup\u00e9rer plusieurs fois de suite la valeur de&hellip; Continuer la lecture &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\" \/>\n<meta property=\"og:site_name\" content=\"Capdata TECH BLOG\" \/>\n<meta property=\"article:published_time\" content=\"2010-08-01T21:52:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-04T07:50:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2010\/08\/photo-1516216628859-9bccecab13ca.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"668\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"David Baffaleuf\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Baffaleuf\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\"},\"author\":{\"name\":\"David Baffaleuf\",\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf\"},\"headline\":\"Mythe: SQL Server associe un thread \u00e0 chaque connexion\",\"datePublished\":\"2010-08-01T21:52:40+00:00\",\"dateModified\":\"2023-01-04T07:50:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\"},\"wordCount\":988,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.capdata.fr\/#organization\"},\"keywords\":[\"sqlos\",\"thread\",\"worker\"],\"articleSection\":[\"SQL Server\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\",\"url\":\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\",\"name\":\"Mythe: SQL Server associe un thread \u00e0 chaque connexion - Capdata TECH BLOG\",\"isPartOf\":{\"@id\":\"https:\/\/blog.capdata.fr\/#website\"},\"datePublished\":\"2010-08-01T21:52:40+00:00\",\"dateModified\":\"2023-01-04T07:50:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/blog.capdata.fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mythe: SQL Server associe un thread \u00e0 chaque connexion\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.capdata.fr\/#website\",\"url\":\"https:\/\/blog.capdata.fr\/\",\"name\":\"Capdata TECH BLOG\",\"description\":\"Le blog technique sur les bases de donn\u00e9es de CAP DATA Consulting\",\"publisher\":{\"@id\":\"https:\/\/blog.capdata.fr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.capdata.fr\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/blog.capdata.fr\/#organization\",\"name\":\"Capdata TECH BLOG\",\"url\":\"https:\/\/blog.capdata.fr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp\",\"contentUrl\":\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp\",\"width\":800,\"height\":254,\"caption\":\"Capdata TECH BLOG\"},\"image\":{\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/cap-data-consulting\/mycompany\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf\",\"name\":\"David Baffaleuf\",\"sameAs\":[\"http:\/\/www.capdata.fr\"],\"url\":\"https:\/\/blog.capdata.fr\/index.php\/author\/dbaffaleuf\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mythe: SQL Server associe un thread \u00e0 chaque connexion - Capdata TECH BLOG","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/","og_locale":"fr_FR","og_type":"article","og_title":"Mythe: SQL Server associe un thread \u00e0 chaque connexion - Capdata TECH BLOG","og_description":"C&#8217;est \u00e9videmment faux, mais il est facile de se m\u00e9prendre sur la question. Pourtant il existe une mani\u00e8re simple de le v\u00e9rifier. Sur une instance non-idle (avec de l&#8217;activit\u00e9), il suffit de r\u00e9cup\u00e9rer plusieurs fois de suite la valeur de&hellip; Continuer la lecture &rarr;","og_url":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/","og_site_name":"Capdata TECH BLOG","article_published_time":"2010-08-01T21:52:40+00:00","article_modified_time":"2023-01-04T07:50:38+00:00","og_image":[{"width":1000,"height":668,"url":"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2010\/08\/photo-1516216628859-9bccecab13ca.jpg","type":"image\/jpeg"}],"author":"David Baffaleuf","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"David Baffaleuf","Dur\u00e9e de lecture estim\u00e9e":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#article","isPartOf":{"@id":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/"},"author":{"name":"David Baffaleuf","@id":"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf"},"headline":"Mythe: SQL Server associe un thread \u00e0 chaque connexion","datePublished":"2010-08-01T21:52:40+00:00","dateModified":"2023-01-04T07:50:38+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/"},"wordCount":988,"commentCount":0,"publisher":{"@id":"https:\/\/blog.capdata.fr\/#organization"},"keywords":["sqlos","thread","worker"],"articleSection":["SQL Server"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/","url":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/","name":"Mythe: SQL Server associe un thread \u00e0 chaque connexion - Capdata TECH BLOG","isPartOf":{"@id":"https:\/\/blog.capdata.fr\/#website"},"datePublished":"2010-08-01T21:52:40+00:00","dateModified":"2023-01-04T07:50:38+00:00","breadcrumb":{"@id":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.capdata.fr\/index.php\/mythe-sql-server-associe-un-thread-a-chaque-connexion\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/blog.capdata.fr\/"},{"@type":"ListItem","position":2,"name":"Mythe: SQL Server associe un thread \u00e0 chaque connexion"}]},{"@type":"WebSite","@id":"https:\/\/blog.capdata.fr\/#website","url":"https:\/\/blog.capdata.fr\/","name":"Capdata TECH BLOG","description":"Le blog technique sur les bases de donn\u00e9es de CAP DATA Consulting","publisher":{"@id":"https:\/\/blog.capdata.fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.capdata.fr\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/blog.capdata.fr\/#organization","name":"Capdata TECH BLOG","url":"https:\/\/blog.capdata.fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/","url":"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp","contentUrl":"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp","width":800,"height":254,"caption":"Capdata TECH BLOG"},"image":{"@id":"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/cap-data-consulting\/mycompany\/"]},{"@type":"Person","@id":"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf","name":"David Baffaleuf","sameAs":["http:\/\/www.capdata.fr"],"url":"https:\/\/blog.capdata.fr\/index.php\/author\/dbaffaleuf\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/1283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/comments?post=1283"}],"version-history":[{"count":62,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/1283\/revisions"}],"predecessor-version":[{"id":9592,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/1283\/revisions\/9592"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/media\/7944"}],"wp:attachment":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/media?parent=1283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/categories?post=1283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/tags?post=1283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}