{"id":985,"date":"2008-11-10T10:38:00","date_gmt":"2008-11-10T10:38:00","guid":{"rendered":"\/blogs\/paul\/post\/Conference-Questions-Pot-Pourri-8-How-to-move-constraint-indexes.aspx"},"modified":"2008-11-10T10:38:00","modified_gmt":"2008-11-10T10:38:00","slug":"conference-questions-pot-pourri-8-how-to-move-constraint-indexes","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/","title":{"rendered":"Conference Questions Pot-Pourri #8: How to move constraint indexes?"},"content":{"rendered":"<p>\n<font face=\"verdana,geneva\" size=\"2\">It&#39;s been a long time since the last Conference Questions Pot-Pourri &#8211; in fact it was at the last SQL Connections in Orlando in April. Now we&#39;re in Las Vegas doing SQL Connections Fall &#8211; Kimberly&#39;s lecturing for an hour on partitioning so I can get out a quick post. <\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">This is a question that came up yesterday &#8211; can CREATE INDEX &#8230; WITH DROP_EXISTING be used to move indexes that enforce constraints? Let&#39;s check it out. <\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">First up I&#39;m going to create a couple of tables. Table t1 has a unique constraint backed by a nonclustered index. Table t1 has a primary key constraint backed by a clustered index.<\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">CREATE DATABASE<\/font> ConstraintTest<font color=\"#808080\">;<\/font><br \/>\n\tGO<br \/>\n\t<font color=\"#0000ff\">USE<\/font> ConstraintTest<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#0000ff\">CREATE TABLE<\/font> UniqueConstraint <font color=\"#808080\">(<\/font>c1 <font color=\"#0000ff\">INT<\/font> <font color=\"#0000ff\">UNIQUE NONCLUSTERED<\/font><font color=\"#808080\">);<\/font><br \/>\n\tGO<br \/>\n\t<font color=\"#0000ff\">INSERT INTO<\/font> UniqueConstraint <font color=\"#0000ff\">VALUES<\/font> <font color=\"#808080\">(<\/font>1<font color=\"#808080\">);<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#0000ff\">CREATE TABLE<\/font> PrimaryKeyConstraint <font color=\"#808080\">(<\/font>c2 <font color=\"#0000ff\">INT<\/font> <font color=\"#0000ff\">PRIMARY KEY CLUSTERED<\/font><font color=\"#808080\">);<\/font><br \/>\n\tGO<br \/>\n\t<font color=\"#0000ff\">INSERT INTO<\/font> PrimaryKeyConstraint <font color=\"#0000ff\">VALUES<\/font> <font color=\"#808080\">(<\/font>1<font color=\"#808080\">);<\/font><br \/>\n\tGO\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">(Oops &#8211; in the original post I&nbsp;c&amp;p&#39;d the wrong code and had the second table as a unique nonclustered constraint too &#8211; sorry for the mixup)&nbsp;<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Now I&#39;ll add another filegroup that we&#39;ll try to move the indexes into.<\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">ALTER DATABASE<\/font> ConstraintTest <font color=\"#0000ff\">ADD FILEGROUP<\/font> ExtraFilegroup<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\t<font color=\"#0000ff\">ALTER DATABASE<\/font> ConstraintTest <font color=\"#0000ff\">ADD FILE<\/font> <font color=\"#808080\">(<\/font><br \/>\n\t<font color=\"#0000ff\">&nbsp;&nbsp; NAME<\/font> <font color=\"#808080\">=<\/font> ExtraFile1<font color=\"#808080\">,<\/font><br \/>\n\t<font color=\"#0000ff\">&nbsp;&nbsp; FILENAME<\/font> <font color=\"#808080\">=<\/font> <font color=\"#ff0000\">&#39;C:\\SQLskills\\ExtraFile1.ndf&#39;<\/font><font color=\"#808080\">,<\/font><br \/>\n\t<font color=\"#0000ff\">&nbsp;&nbsp; SIZE<\/font> <font color=\"#808080\">=<\/font> 5MB<font color=\"#808080\">)<\/font><br \/>\n\t<font color=\"#0000ff\">TO FILEGROUP<\/font> ExtraFilegroup<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Now I&#39;ll try moving the nonclustered index enforcing the unique constraint.<\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">SELECT<\/font> [name]<font color=\"#808080\">,<\/font> [index_id] <font color=\"#0000ff\">FROM<\/font> <font color=\"#008000\">sys.indexes<\/font><br \/>\n\t<font color=\"#0000ff\">WHERE<\/font> [object_id] <font color=\"#808080\">=<\/font> <font color=\"#ff00ff\">OBJECT_ID<\/font> <font color=\"#808080\">(<\/font><font color=\"#ff0000\">&#39;UniqueConstraint&#39;<\/font><font color=\"#808080\">)<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\tname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index_id<br \/>\n\t&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211;<br \/>\n\tNULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br \/>\n\tUQ__UniqueConstraint__7C8480AE 2\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">The index we want is index ID=2, so we should be able to move it as follows:<\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">CREATE UNIQUE NONCLUSTERED INDEX<\/font> UQ__UniqueConstraint__7C8480AE<br \/>\n\t<font color=\"#0000ff\">ON<\/font> UniqueConstraint <font color=\"#808080\">(<\/font>c1<font color=\"#808080\">)<\/font> <font color=\"#0000ff\">WITH<\/font> <font color=\"#808080\">(<\/font><font color=\"#0000ff\">DROP_EXISTING<\/font> <font color=\"#808080\">=<\/font> <font color=\"#0000ff\">ON<\/font><font color=\"#808080\">)<\/font><br \/>\n\t<font color=\"#0000ff\">ON<\/font> ExtraFilegroup<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font face=\"verdana,geneva\"><font size=\"2\">No problem! Now let&#39;s try the same thing for the clustered primary key constraint.<\/font> <\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">SELECT<\/font> [name]<font color=\"#808080\">,<\/font> [index_id] <font color=\"#0000ff\">FROM<\/font> <font color=\"#008000\">sys.indexes<\/font><br \/>\n\t<font color=\"#0000ff\">WHERE<\/font> [object_id] <font color=\"#808080\">=<\/font> <font color=\"#ff00ff\">OBJECT_ID<\/font> <font color=\"#808080\">(<\/font><font color=\"#ff0000\">&#39;PrimaryKeyConstraint&#39;<\/font><font color=\"#808080\">)<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\tname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index_id<br \/>\n\t&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211;<br \/>\n\tPK__PrimaryKeyConstr__7E6CC920 1\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">We only have one choice, so we should be able to rebuild it using:<\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">CREATE CLUSTERED INDEX<\/font> PK__PrimaryKeyConstr__7E6CC920<br \/>\n\t<font color=\"#0000ff\">ON<\/font> PrimaryKeyConstraint <font color=\"#808080\">(<\/font>c2<font color=\"#808080\">)<\/font> <font color=\"#0000ff\">WITH<\/font> <font color=\"#808080\">(<\/font><font color=\"#0000ff\">DROP_EXISTING<\/font> <font color=\"#808080\">=<\/font> <font color=\"#0000ff\">ON<\/font><font color=\"#808080\">)<\/font><br \/>\n\t<font color=\"#0000ff\">ON<\/font> ExtraFilegroup<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<p align=\"left\">\n\t<font color=\"#ff0000\">Msg 1907, Level 16, State 1, Line 1<br \/>\n\tCannot recreate index &#39;PK__PrimaryKeyConstr__7E6CC920&#39;. The new index definition does not match the constraint being enforced by the existing index.<\/font>\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Hmm &#8211; what am I missing? I&#39;ll check sys.indexes again and not filter the columns this time:<\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p align=\"left\">\n\t<font color=\"#0000ff\">SELECT<\/font> <font color=\"#808080\">*<\/font> <font color=\"#0000ff\">FROM<\/font> <font color=\"#008000\">sys.indexes<br \/>\n\t<\/font><font color=\"#0000ff\">WHERE<\/font> [object_id] <font color=\"#808080\">=<\/font> <font color=\"#ff00ff\">OBJECT_ID<\/font> <font color=\"#808080\">(<\/font><font color=\"#ff0000\">&#39;PrimaryKeyConstraint&#39;<\/font><font color=\"#808080\">)<\/font><br \/>\n\tGO\n\t<\/p>\n<p>\n\tobject_id&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index_id type type_desc is_unique<br \/>\n\t&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211; &#8212;- &#8212;&#8212;&#8212; &#8212;&#8212;&#8212;<br \/>\n\t2105058535 PK__PrimaryKeyConstr__7E6CC920 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; CLUSTERED 1\n\t<\/p>\n<p>\n\t<font face=\"courier new,courier\" size=\"2\">data_space_id ignore_dup_key is_primary_key is_unique_constraint fill_factor<br \/>\n\t&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211;<br \/>\n\t1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<\/font>\n\t<\/p>\n<p>\n\t<font size=\"2\"><font face=\"courier new,courier\">is_padded is_disabled is_hypothetical allow_row_locks allow_page_locks<br \/>\n\t&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211;&nbsp;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n\t0<\/font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<\/font>\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font size=\"2\">Ah &#8211; I was missing the unique attribute on the index. What I need to do is the following:<\/font>\n<\/p>\n<p><font face=\"courier new\" size=\"2\"><\/p>\n<blockquote>\n<p>\n\t<font color=\"#0000ff\">CREATE UNIQUE CLUSTERED INDEX<\/font> PK__PrimaryKeyConstr__7E6CC920<br \/>\n\t<font color=\"#0000ff\">ON<\/font> PrimaryKeyConstraint <font color=\"#808080\">(<\/font>c2<font color=\"#808080\">)<\/font> <font color=\"#0000ff\">WITH<\/font> <font color=\"#808080\">(<\/font><font color=\"#0000ff\">DROP_EXISTING<\/font> <font color=\"#808080\">=<\/font> <font color=\"#0000ff\">ON<\/font><font color=\"#808080\">)<\/font><br \/>\n\t<font color=\"#0000ff\">ON<\/font> ExtraFilegroup<font color=\"#808080\">;<\/font><br \/>\n\tGO\n\t<\/p>\n<\/blockquote>\n<p><\/font><\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">And that works fine. So &#8211; the answer is yes, you can use <font face=\"courier new,courier\">CREATE INDEX &#8230; WITH DROP_EXISTING<\/font> to move indexes that enforce constraints. This is really good, as it allows you to move these indexes without having to do <font face=\"courier new,courier\">DROP INDEX<\/font> then <font face=\"courier new,courier\">CREATE INDEX<\/font>. That method is bad, as it creates a window of opportunity for someone to enter data that violates the constraint while the index is dropped.<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#39;s been a long time since the last Conference Questions Pot-Pourri &#8211; in fact it was at the last SQL Connections in Orlando in April. Now we&#39;re in Las Vegas doing SQL Connections Fall &#8211; Kimberly&#39;s lecturing for an hour on partitioning so I can get out a quick post. This is a question that [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,28,38,47],"tags":[],"class_list":["post-985","post","type-post","status-publish","format-standard","hentry","category-conference-questions-pot-pourri","category-constraints","category-example-scripts","category-indexes-from-every-angle"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Conference Questions Pot-Pourri #8: How to move constraint indexes? - Paul S. Randal<\/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:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Conference Questions Pot-Pourri #8: How to move constraint indexes? - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"It&#039;s been a long time since the last Conference Questions Pot-Pourri &#8211; in fact it was at the last SQL Connections in Orlando in April. Now we&#039;re in Las Vegas doing SQL Connections Fall &#8211; Kimberly&#039;s lecturing for an hour on partitioning so I can get out a quick post. This is a question that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2008-11-10T10:38:00+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/\",\"name\":\"Conference Questions Pot-Pourri #8: How to move constraint indexes? - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2008-11-10T10:38:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Conference Questions Pot-Pourri #8: How to move constraint indexes?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Conference Questions Pot-Pourri #8: How to move constraint indexes? - Paul S. Randal","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:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/","og_locale":"en_US","og_type":"article","og_title":"Conference Questions Pot-Pourri #8: How to move constraint indexes? - Paul S. Randal","og_description":"It&#39;s been a long time since the last Conference Questions Pot-Pourri &#8211; in fact it was at the last SQL Connections in Orlando in April. Now we&#39;re in Las Vegas doing SQL Connections Fall &#8211; Kimberly&#39;s lecturing for an hour on partitioning so I can get out a quick post. This is a question that [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/","og_site_name":"Paul S. Randal","article_published_time":"2008-11-10T10:38:00+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/","name":"Conference Questions Pot-Pourri #8: How to move constraint indexes? - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2008-11-10T10:38:00+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/conference-questions-pot-pourri-8-how-to-move-constraint-indexes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Conference Questions Pot-Pourri #8: How to move constraint indexes?"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=985"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/985\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}