{"id":3268,"date":"2012-04-02T09:01:29","date_gmt":"2012-04-02T08:01:29","guid":{"rendered":"http:\/\/blog.capdata.fr\/?p=3268"},"modified":"2019-09-13T14:23:34","modified_gmt":"2019-09-13T13:23:34","slug":"production-sql-server-reorganisation-des-objets","status":"publish","type":"post","link":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/","title":{"rendered":"Production SQL Server: R\u00e9organisation des objets"},"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%2F3268&#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%2F3268&#038;title=Production%20SQL%20Server%3A%20R%C3%A9organisation%20des%20objets\" 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=Production%20SQL%20Server%3A%20R%C3%A9organisation%20des%20objets&#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%2F3268\" 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>Cinqui\u00e8me article de la s\u00e9rie <a href=\"http:\/\/blog.capdata.fr\/index.php\/une-approche-pragmatique-de-la-production-sql-server\">Une approche pragmatique de la production SQL Server<\/a>, il s\u2019agit ici de la d\u00e9fragmentation des objets.<\/p>\n<p><strong>Qu\u2019est-ce que la fragmentation\u00a0?<\/strong><\/p>\n<p>Lorsqu\u2019un objet (table ou indexe) subit des modifications, ses pages peuvent se vider partiellement (on parle de fragmentation interne) et certaines pages, voire certaines extensions (groupes de 8 pages contig\u00fces) peuvent se vider compl\u00e8tement (il s\u2019agit alors de fragmentation externe).<\/p>\n<p><strong>Quel est l\u2019impact sur les performances\u00a0?<\/strong><\/p>\n<p><em>Sur disque<\/em><br \/>\nPour lire une donn\u00e9e sur disque physique, il faut\u00a0:<\/p>\n<p>D\u00e9placer la t\u00eate de lecture du disque. Cette op\u00e9ration est longue, de l\u2019ordre de 5 millisecondes en moyenne<\/p>\n<p>Attendre que le secteur de donn\u00e9es \u00e0 lire passe sous la t\u00eate. Cette op\u00e9ration prend en moyenne entre 2 et 6 millisecondes (un demi-tour du disque, \u00e0 une vitesse de rotation entre 5000 et 15000 tr\/min)<\/p>\n<p>Lorsque les secteurs \u00e0 lire sont contigus (c.-\u00e0-d. plac\u00e9s physiquement \u00e0 la suite les uns des autres), la t\u00eate de lecture n\u2019a plus \u00e0 se d\u00e9placer\u00a0; lire 100 secteurs contigus prend donc \u00e0 peine plus de temps que d\u2019en lire un seul (disons 5ms pour la t\u00eate+ 4ms pour le demi tour + 1ms pour la lecture des 100 secteurs=10ms contre 100x(6 + 4)=1000ms pour des secteurs non contigus).<\/p>\n<p>Si l\u2019objet est fragment\u00e9, les d\u00e9placements de la t\u00eate de lecture seront plus fr\u00e9quents, les temps de lecture seront donc (beaucoup) plus longs.<\/p>\n<p><em>En m\u00e9moire<\/em><br \/>\nLorsqu\u2019un objet n\u2019est pas fragment\u00e9, ses pages sont pleines. L\u2019objet occupe donc moins de place que s\u2019il \u00e9tait fragment\u00e9. Un objet fragment\u00e9 occupera donc plus de place en m\u00e9moire qu\u2019un objet non fragment\u00e9, au d\u00e9triment des autres objets.<\/p>\n<p><em>Pour l&#8217;Optimizer<\/em><br \/>\nLorsque SQL Server calcule le co\u00fbt d&#8217;une op\u00e9ration, il distingue une lecture s\u00e9quentielle (consid\u00e9r\u00e9e peu co\u00fbteuse) et une lecture al\u00e9atoire (consid\u00e9r\u00e9e tr\u00e8s co\u00fbteuse). Si un objet est fortement fragment\u00e9, les lectures s\u00e9quentielles deviennent plus co\u00fbteuses que ce qu&#8217;a estim\u00e9 SQL Server, le plan d&#8217;ex\u00e9cution choisi n&#8217;est donc potentiellement plus optimal.<\/p>\n<p><strong>Mesurer la fragmentation<\/strong><\/p>\n<p>Depuis la version 2005 de SQL Server, le taux de fragmentation est directement consultable via une vue dynamique de gestion.<\/p>\n<pre name=\"code\" class=\"sql\">\r\nselect object_name(I.object_id) 'Table', I.name 'Indexe', IPS.avg_fragmentation_in_percent 'Taux de Fragmentation'\r\n\r\nFROM sys.dm_db_index_physical_stats(DB_ID(),DEFAULT, DEFAULT, DEFAULT,DEFAULT) IPS\r\n\r\ninner join sys.indexes I ON I.object_id = IPS.object_id AND I.index_id = IPS.index_id\r\n\r\nwhere IPS.index_level=0\r\n\r\nand IPS.index_id !=0\r\n\r\norder by 1,IPS.index_id,2\r\n<\/pre>\n<p><strong>Comment d\u00e9fragmenter\u00a0?<\/strong><\/p>\n<p>D\u00e9fragmenter un objet consiste \u00e0 le compacter et \u00e0 d\u00e9placer ses pages de mani\u00e8re \u00e0 ce qu\u2019elles soient contig\u00fces. L\u2019action de d\u00e9fragmenter est la r\u00e9organisation, elle est g\u00e9r\u00e9e dans SQL Server par deux ordres\u00a0:<\/p>\n<pre name=\"code\" class=\"sql\">\r\nALTER INDEX REBUILD \r\n--et \r\nALTER INDEX REORGANIZE\r\n<\/pre>\n<p>Lorsqu\u2019une table ne contient pas d\u2019indexe clusteris\u00e9, il faut soit l\u2019exporter, la vider puis la r\u00e9importer (attention aux contraintes r\u00e9f\u00e9rentielles qui pourraient emp\u00eacher ces op\u00e9rations), soit cr\u00e9er un indexe clusteris\u00e9 puis le supprimer.<\/p>\n<p>Lorsqu\u2019elle en contient un, la m\u00e9thode de d\u00e9fragmentation d\u00e9pendra du taux de fragmentation observ\u00e9.<\/p>\n<p>(les valeurs ci-dessous sont relativement empiriques)<\/p>\n<p>Taux &lt;5%\u00a0Pas de d\u00e9fragmentation. La consommation des ressources li\u00e9e \u00e0 la d\u00e9fragmentation serait a priori sup\u00e9rieure au gain en performance r\u00e9sultant.<\/p>\n<p>Taux compris entre 5 et 25% ALTER INDEX &lt;nom de l&#8217;indexe&gt; ON &lt;nom de la table&gt; REORGANIZE . La d\u00e9fragmentation s\u2019op\u00e9rera uniquement au niveau des feuilles de l\u2019indexe\/la table, mais sera relativement peu consommatrice en ressources.<\/p>\n<p>Taux sup\u00e9rieur \u00e0 25% ALTER INDEX &lt;nom de l&#8217;indexe&gt; ON &lt;nom de la table&gt; REBUILD.<\/p>\n<p>Cette m\u00e9thode va reconstruire int\u00e9gralement l\u2019indexe\/la table, op\u00e9ration consommatrice mais aboutissant \u00e0 une table compl\u00e8tement d\u00e9fragment\u00e9e.<\/p>\n<p>A noter que\u00a0:<\/p>\n<ul>\n<li>La d\u00e9fragmentation est un processus tr\u00e8s consommateur en ressources (disque et m\u00e9moire), il est donc \u00e0 lancer en dehors des fortes p\u00e9riodes d\u2019activit\u00e9.<\/li>\n<li>La d\u00e9fragmentation via ALTER INDEX REBUILD va mettre automatiquement \u00e0 jour les statistiques. Inutile donc d\u2019effectuer \u00e0 nouveau cette mise \u00e0 jour dans votre t\u00e2che de maintenance de mise \u00e0 jour des stats (cf article 4).<\/li>\n<li>En \u00e9dition Enterprise, il est possible de r\u00e9duire l\u2019impact de la d\u00e9fragmentation en utilisant l\u2019option ONLINE.<\/li>\n<li>Le taux de fragmentation des tables de tr\u00e8s petite volum\u00e9trie ne pourra \u00eatre r\u00e9duit \u00e0 0 (cf <a href=\"http:\/\/blog.capdata.fr\/index.php\/fragmentation-sur-des-tables-stockees-en-s-gam\/\">cet article<\/a>), c\u2019est tout \u00e0 fait normal\u00a0!<\/li>\n<\/ul>\n<p>Voici un exemple de proc\u00e9dure stock\u00e9e permettant de d\u00e9fragmenter les indexes d\u2019une base\u00a0:<\/p>\n<pre name=\"code\" class=\"sql\">USE outils_dba\r\n\r\nGO\r\n\r\nIF OBJECT_ID('defragmente_base') IS NOT NULL\r\n\r\nDROP PROCEDURE defragmente_base\r\n\r\nGO\r\n\r\nCREATE PROCEDURE defragmente_base (\t@nom_base sysname,\r\n\r\n@online varchar(3)='NON'\r\n\r\n)\r\n\r\nAS\r\n\r\n\/***************************************************************************************\r\n\r\nB. Vesan, Cap Data Consulting, F\u00e9vrier 2012\r\n\r\nCette procedure permet de d\u00e9fragmenter les indexes d'une base.\r\n\r\n0&lt;Taux&lt;5\tPas de d\u00e9fragmentation\r\n\r\n5&lt;=Taux&lt;25\tREORGANIZE\r\n\r\n25&lt;=Taux\tREBUILD\r\n\r\nSi la valeur du param\u00e8tre @online vaut 'OUI', la reconstruction sera effectu\u00e9e avec l'\r\n\r\noption ONLINE=ON\r\n\r\nLa proc\u00e9dure retournera 0 en cas de succ\u00e8s, 1 en cas d'\u00e9chec.\r\n\r\n***************************************************************************************\/\r\n\r\nBEGIN\r\n\r\nSET NOCOUNT ON\r\n\r\nDECLARE @cmd varchar(4000),@msg varchar(1000), @option varchar(100), @erreur int\r\n\r\nCREATE TABLE #table_defrag(commande varchar(4000))\r\n\r\nIF DB_ID(@nom_base) IS NULL\r\n\r\nBEGIN\r\n\r\nSET @msg = 'Echec de l'' ex\u00e9cution de defragmente_base : La base '+ISNULL(@nom_base,'(valeur nulle)')+' n''existe pas'\r\n\r\nRAISERROR (@msg, 16, 1) WITH NOWAIT,LOG\r\n\r\nreturn 1\r\n\r\nEND\r\n\r\nIF ( DATABASEPROPERTYEX(@nom_base,'Status ')!='ONLINE' OR EXISTS (select 1 FROM sys.databases WHERE name=@nom_base AND source_database_id IS NOT NULL))\r\n\r\nBEGIN\r\n\r\nSET @msg = 'La base '+@nom_base+' n''est pas disponible ou il s''agit d''un snapshot'\r\n\r\nPRINT @msg\r\n\r\nreturn 0\r\n\r\nEND\r\n\r\nset @option = (CASE UPPER(@online) WHEN 'OUI' THEN ' WITH ( ONLINE = ON )' ELSE '' END)\r\n\r\nset @cmd='USE ['+@nom_base+']\r\n\r\nselect ''ALTER INDEX [''+I.name+''] ON ['+@nom_base+'].[''+S.name+''].[''+T.name+''] ''+\r\n\r\n(CASE WHEN IPS.avg_fragmentation_in_percent &gt;= 25 THEN ''REBUILD '+@option+''' ELSE ''REORGANIZE '' END)\r\n\r\nFROM sys.dm_db_index_physical_stats(DB_ID(),DEFAULT, DEFAULT, DEFAULT,DEFAULT) IPS\r\n\r\ninner join sys.indexes I ON I.object_id = IPS.object_id AND I.index_id = IPS.index_id\r\n\r\ninner join sys.tables T ON T.object_id = I.object_id\r\n\r\ninner join sys.schemas S ON S.schema_id = T.schema_id\r\n\r\nwhere IPS.index_level=0\r\n\r\nand IPS.index_id !=0\r\n\r\nand IPS.avg_fragmentation_in_percent &gt;=5\r\n\r\nAND alloc_unit_type_desc NOT IN(''LOB_DATA'')\r\n\r\norder by object_name(I.object_id),IPS.index_id'\r\n\r\n--PRINT @cmd\r\n\r\nINSERT INTO #table_defrag\r\n\r\nEXECUTE(@cmd)\r\n\r\nDECLARE CURSEUR_INDEXES INSENSITIVE CURSOR FOR\r\n\r\nselect commande from #table_defrag\r\n\r\nOPEN CURSEUR_INDEXES\r\n\r\nFETCH NEXT FROM CURSEUR_INDEXES INTO @cmd\r\n\r\nWHILE(@@FETCH_STATUS=0)\r\n\r\nBEGIN\r\n\r\n--\tPRINT @cmd\r\n\r\nEXECUTE(@cmd)\r\n\r\nselect @erreur=@@ERROR\r\n\r\nIF @erreur !=0\r\n\r\nBEGIN\r\n\r\nSET @msg = 'Echec de l'' ex\u00e9cution de defragmente_base : Erreur '+CAST(@erreur as varchar(5))+' lors de l''appel \u00e0 la commande \"'+@cmd+'\"'\r\n\r\nRAISERROR (@msg, 16, 1) WITH NOWAIT,LOG\r\n\r\nCLOSE CURSEUR_INDEXES\r\n\r\nDEALLOCATE CURSEUR_INDEXES\r\n\r\nDROP TABLE #table_defrag\r\n\r\nreturn 1\r\n\r\nEND\r\n\r\nFETCH NEXT FROM CURSEUR_INDEXES INTO @cmd\r\n\r\nEND\r\n\r\nCLOSE CURSEUR_INDEXES\r\n\r\nDEALLOCATE CURSEUR_INDEXES\r\n\r\nDROP TABLE #table_defrag\r\n\r\nEND\r\n\r\nGO<\/pre>\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%2F3268&#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%2F3268&#038;title=Production%20SQL%20Server%3A%20R%C3%A9organisation%20des%20objets\" 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=Production%20SQL%20Server%3A%20R%C3%A9organisation%20des%20objets&#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%2F3268\" 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>Cinqui\u00e8me article de la s\u00e9rie Une approche pragmatique de la production SQL Server, il s\u2019agit ici de la d\u00e9fragmentation des objets. Qu\u2019est-ce que la fragmentation\u00a0? Lorsqu\u2019un objet (table ou indexe) subit des modifications, ses pages peuvent se vider partiellement (on&hellip; <a href=\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/\" class=\"more-link\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":14,"featured_media":7888,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[206,212],"class_list":["post-3268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sqlserver","tag-howto","tag-production"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Production SQL Server: R\u00e9organisation des objets - 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\/production-sql-server-reorganisation-des-objets\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Production SQL Server: R\u00e9organisation des objets - Capdata TECH BLOG\" \/>\n<meta property=\"og:description\" content=\"Cinqui\u00e8me article de la s\u00e9rie Une approche pragmatique de la production SQL Server, il s\u2019agit ici de la d\u00e9fragmentation des objets. Qu\u2019est-ce que la fragmentation\u00a0? Lorsqu\u2019un objet (table ou indexe) subit des modifications, ses pages peuvent se vider partiellement (on&hellip; Continuer la lecture &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/\" \/>\n<meta property=\"og:site_name\" content=\"Capdata TECH BLOG\" \/>\n<meta property=\"article:published_time\" content=\"2012-04-02T08:01:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-13T13:23:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2012\/04\/reorg.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Benjamin VESAN\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benjamin VESAN\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 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\/production-sql-server-reorganisation-des-objets\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/\"},\"author\":{\"name\":\"Benjamin VESAN\",\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/person\/ae56d1d3d5680d95ccc2c927e44bdc3e\"},\"headline\":\"Production SQL Server: R\u00e9organisation des objets\",\"datePublished\":\"2012-04-02T08:01:29+00:00\",\"dateModified\":\"2019-09-13T13:23:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/\"},\"wordCount\":732,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.capdata.fr\/#organization\"},\"keywords\":[\"howto\",\"Production\"],\"articleSection\":[\"SQL Server\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/\",\"url\":\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/\",\"name\":\"Production SQL Server: R\u00e9organisation des objets - Capdata TECH BLOG\",\"isPartOf\":{\"@id\":\"https:\/\/blog.capdata.fr\/#website\"},\"datePublished\":\"2012-04-02T08:01:29+00:00\",\"dateModified\":\"2019-09-13T13:23:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/blog.capdata.fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Production SQL Server: R\u00e9organisation des objets\"}]},{\"@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\/ae56d1d3d5680d95ccc2c927e44bdc3e\",\"name\":\"Benjamin VESAN\",\"url\":\"https:\/\/blog.capdata.fr\/index.php\/author\/bvesan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Production SQL Server: R\u00e9organisation des objets - 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\/production-sql-server-reorganisation-des-objets\/","og_locale":"fr_FR","og_type":"article","og_title":"Production SQL Server: R\u00e9organisation des objets - Capdata TECH BLOG","og_description":"Cinqui\u00e8me article de la s\u00e9rie Une approche pragmatique de la production SQL Server, il s\u2019agit ici de la d\u00e9fragmentation des objets. Qu\u2019est-ce que la fragmentation\u00a0? Lorsqu\u2019un objet (table ou indexe) subit des modifications, ses pages peuvent se vider partiellement (on&hellip; Continuer la lecture &rarr;","og_url":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/","og_site_name":"Capdata TECH BLOG","article_published_time":"2012-04-02T08:01:29+00:00","article_modified_time":"2019-09-13T13:23:34+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2012\/04\/reorg.jpg","type":"image\/jpeg"}],"author":"Benjamin VESAN","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Benjamin VESAN","Dur\u00e9e de lecture estim\u00e9e":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/#article","isPartOf":{"@id":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/"},"author":{"name":"Benjamin VESAN","@id":"https:\/\/blog.capdata.fr\/#\/schema\/person\/ae56d1d3d5680d95ccc2c927e44bdc3e"},"headline":"Production SQL Server: R\u00e9organisation des objets","datePublished":"2012-04-02T08:01:29+00:00","dateModified":"2019-09-13T13:23:34+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/"},"wordCount":732,"commentCount":0,"publisher":{"@id":"https:\/\/blog.capdata.fr\/#organization"},"keywords":["howto","Production"],"articleSection":["SQL Server"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/","url":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/","name":"Production SQL Server: R\u00e9organisation des objets - Capdata TECH BLOG","isPartOf":{"@id":"https:\/\/blog.capdata.fr\/#website"},"datePublished":"2012-04-02T08:01:29+00:00","dateModified":"2019-09-13T13:23:34+00:00","breadcrumb":{"@id":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.capdata.fr\/index.php\/production-sql-server-reorganisation-des-objets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/blog.capdata.fr\/"},{"@type":"ListItem","position":2,"name":"Production SQL Server: R\u00e9organisation des objets"}]},{"@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\/ae56d1d3d5680d95ccc2c927e44bdc3e","name":"Benjamin VESAN","url":"https:\/\/blog.capdata.fr\/index.php\/author\/bvesan\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/3268","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\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/comments?post=3268"}],"version-history":[{"count":41,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/3268\/revisions"}],"predecessor-version":[{"id":3536,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/3268\/revisions\/3536"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/media\/7888"}],"wp:attachment":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/media?parent=3268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/categories?post=3268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/tags?post=3268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}