{"id":503,"date":"2012-03-08T02:32:00","date_gmt":"2012-03-08T02:32:00","guid":{"rendered":"\/blogs\/joe\/post\/Comparing-Query-Performance-when-using-an-e2809cideale2809d-Nonclustered-Index-versus-Columnstore-Index.aspx"},"modified":"2013-01-02T20:32:16","modified_gmt":"2013-01-03T04:32:16","slug":"comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/","title":{"rendered":"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index"},"content":{"rendered":"<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">I gave a presentation on columnstore indexing last week and one question I received was regarding the performance of a (hypothetical) narrow, supporting nonclustered index versus a columnstore index.<span style=\"mso-spacerun: yes\">&#160; <\/span>We discussed how nonclustered indexes were still going to be more effective for specific types of queries (for example \u2013 singleton operations, smaller range scans, etc.).<span style=\"mso-spacerun: yes\">&#160; <\/span>But what about a situation where we\u2019re aggregating data across the entire fact table? Was there any way that a narrow nonclustered index could measure up against a columnstore index?<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">The ability to contrast the performance is of course very much dependent on the query construction, table design, data distribution and other factors.<span style=\"mso-spacerun: yes\">&#160; <\/span>With that said, I thought I would test out a scenario as follows\u2026<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">First of all, I used FactInternetSales &#8211; pumped up to 123,695,104 rows.<span style=\"mso-spacerun: yes\">&#160; <\/span>The query I used for comparing performance was as follows (with a few hint-modifications to force index and parallelism caps that I used later):<\/font><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">SELECT<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"><span style=\"mso-tab-count: 1\">&#160;&#160;&#160;&#160; <\/span><span style=\"color: \"><font color=\"#008080\">p<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><span style=\"color: \"><font color=\"#008080\">ProductLine<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#808080\">,<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font face=\"Lucida Console\"><span style=\"mso-tab-count: 2\"><font style=\"font-size: 11pt\">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <\/font><\/span><font style=\"font-size: 11pt\"><span style=\"color: \"><font color=\"#ff00ff\">SUM<\/font><\/span><span style=\"color: \"><font color=\"#808080\">(<\/font><\/span><span style=\"color: \"><font color=\"#008080\">f<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><span style=\"color: \"><font color=\"#008080\">SalesAmount<\/font><\/span><span style=\"color: \"><font color=\"#808080\">)<\/font><\/span> <\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#008080\">TotalSalesAmount<\/font><\/span><\/font><\/span><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">FROM<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#008080\">[dbo]<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><span style=\"color: \"><font color=\"#008080\">[FactInternetSales]<\/font><\/span> <\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#008080\">f<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#808080\"><font style=\"font-size: 11pt\">INNER<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#808080\">JOIN<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">[dbo]<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><span style=\"color: \"><font color=\"#008080\">[DimProduct]<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">p<\/font><\/span> <\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#0000ff\">ON<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font face=\"Lucida Console\"><span style=\"mso-tab-count: 1\"><font style=\"font-size: 11pt\">&#160;&#160;&#160;&#160; <\/font><\/span><font style=\"font-size: 11pt\"><span style=\"color: \"><font color=\"#008080\">f<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><span style=\"color: \"><font color=\"#008080\">ProductKey<\/font><\/span> <span style=\"color: \"><font color=\"#808080\">=<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">p<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#008080\">ProductKey<\/font><\/span><\/font><\/span><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">GROUP<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#0000ff\">BY<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">p<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#008080\">ProductLine<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">ORDER<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#0000ff\">BY<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">p<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><span style=\"color: \"><font color=\"#008080\">ProductLine<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#808080\">;<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">&#160;<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">I created the following nonclustered indexes (index on joining keys \u2013 and then an INCLUDE on the SalesAmount which is being aggregated):<\/font><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">CREATE<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#0000ff\">NONCLUSTERED<\/font><\/span> <span style=\"color: \"><font color=\"#0000ff\">INDEX<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">[NCI_FactInternetSales_ProductKey]<\/font><\/span> <\/font><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">ON<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#008080\">[dbo]<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#008080\">[FactInternetSales]<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#808080\"><font style=\"font-size: 11pt\">(<\/font><\/font><\/span><font style=\"font-size: 11pt\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#008080\">[ProductKey]<\/font><\/span><\/font><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#0000ff\">ASC<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#808080\">)<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">INCLUDE <\/font><\/font><\/span><font style=\"font-size: 11pt\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#808080\">(<\/font><\/span><\/font><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"mso-tab-count: 1\"><\/span><span style=\"color: \"><font color=\"#008080\">[SalesAmount]<\/font><\/span><span style=\"color: \"><font color=\"#808080\">)<\/font><\/span> <span style=\"color: \"><font color=\"#0000ff\">ON<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">[PRIMARY]<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#808080\">;<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font face=\"Lucida Console\"><font style=\"font-size: 11pt\" color=\"#0000ff\">GO<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><\/span><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font face=\"Lucida Console\"><font style=\"font-size: 11pt\">&#160;<\/font><\/font><\/span><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">CREATE<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#0000ff\">NONCLUSTERED<\/font><\/span> <span style=\"color: \"><font color=\"#0000ff\">INDEX<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">[NCI_DimProduct_ProductKey_ProductLine]<\/font><\/span> <span style=\"color: \"><font color=\"#0000ff\">ON<\/font><\/span> <span style=\"color: \"><font color=\"#008080\">[dbo]<\/font><\/span><span style=\"color: \"><font color=\"#808080\">.<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#008080\">[DimProduct]<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#808080\"><font style=\"font-size: 11pt\">(<\/font><\/font><\/span><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"><span style=\"mso-tab-count: 1\">&#160;&#160;&#160; <\/span><span style=\"color: \"><font color=\"#008080\">[ProductKey]<\/font><\/span> <span style=\"color: \"><font color=\"#0000ff\">ASC<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#808080\">,<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font face=\"Lucida Console\"><span style=\"mso-tab-count: 1\"><font style=\"font-size: 11pt\">&#160;&#160;&#160;&#160; <\/font><\/span><font style=\"font-size: 11pt\"><span style=\"color: \"><font color=\"#008080\">[ProductLine]<\/font><\/span> <\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#0000ff\">ASC<\/font><\/span><\/font><\/span><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#808080\"><font style=\"font-size: 11pt\">)<\/font><\/font><\/span><font style=\"font-size: 11pt\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\">ON<\/font><\/span><\/font><span style=\"font-family: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\"> <span style=\"color: \"><font color=\"#008080\">[PRIMARY]<\/font><\/span><\/font><span style=\"color: \"><font style=\"font-size: 11pt\" color=\"#808080\">;<\/font><\/span><\/span><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font face=\"Lucida Console\"><font style=\"font-size: 11pt\" color=\"#0000ff\">GO<\/font><\/font><\/span><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">&#160;<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">I also created a columnstore index that covered all columns in the fact table.<span style=\"mso-spacerun: yes\">&#160; <\/span>To force my query to ignore that index for the comparison test, I added the following line:<\/font><\/font><\/p>\n<p style=\"line-height: normal; margin: 0in 0in 0pt; text-autospace: ; mso-layout-grid-align: none\" class=\"MsoNormal\"><font face=\"Lucida Console\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#0000ff\"><font style=\"font-size: 11pt\">OPTION <\/font><\/font><\/span><font style=\"font-size: 11pt\"><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#808080\">(<\/font><\/span><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font color=\"#008080\">IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX<\/font><\/span><\/font><span style=\"font-family: ; color: ; mso-bidi-font-family: &#39;Lucida Console&#39;\"><font style=\"font-size: 11pt\" color=\"#808080\">);<\/font><\/span><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">&#160;<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">So how did the performance compare between a supporting nonclustered index versus the columnstore index? (<i style=\"mso-bidi-font-style: normal\">By the way, I used a warm cache for both tests \u2013 executing twice<\/i>):<\/font><\/font><\/p>\n<table style=\"border-bottom: medium none; border-left: medium none; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-border-top-alt: solid black 1.0pt; mso-border-top-themecolor: text1; mso-border-bottom-alt: solid black 1.0pt; mso-border-bottom-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt\" class=\"MsoTableLightShading\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"mso-yfti-irow: -1; mso-yfti-firstrow: yes\">\n<td style=\"border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: medium none; padding-top: 0in; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1\" valign=\"top\" width=\"206\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Index Support<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: medium none; padding-top: 0in; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1\" valign=\"top\" width=\"208\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Elapsed Time<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: medium none; padding-top: 0in; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1\" valign=\"top\" width=\"196\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">CPU Time<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 0\">\n<td style=\"border-bottom: medium none; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: medium none; padding-top: 0in; mso-background-themecolor: text1; mso-background-themetint: 63\" valign=\"top\" width=\"206\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Columnstore<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: medium none; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: medium none; padding-top: 0in; mso-background-themecolor: text1; mso-background-themetint: 63\" valign=\"top\" width=\"208\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">256 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: medium none; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: medium none; padding-top: 0in; mso-background-themecolor: text1; mso-background-themetint: 63\" valign=\"top\" width=\"196\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">1045 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 1; mso-yfti-lastrow: yes\">\n<td style=\"border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: medium none; padding-top: 0in; mso-border-bottom-themecolor: text1\" valign=\"top\" width=\"206\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 4\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Nonclustered index<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: medium none; padding-top: 0in; mso-border-bottom-themecolor: text1\" valign=\"top\" width=\"208\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">34189 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: medium none; padding-top: 0in; mso-border-bottom-themecolor: text1\" valign=\"top\" width=\"196\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">33322 ms<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">&#160;<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">The columnstore index plan was as follows:<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><span style=\"mso-no-proof: yes\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/4129d6df\/clip_image002.jpg\"><img fetchpriority=\"high\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"clip_image002\" border=\"0\" alt=\"clip_image002\" src=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/3212f805\/clip_image002_thumb.jpg\" width=\"851\" height=\"152\" \/><\/a><\/span><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">The nonclustered index plan was as follows:<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><span style=\"mso-no-proof: yes\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/37ed9b9e\/clip_image004.jpg\"><img decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"clip_image004\" border=\"0\" alt=\"clip_image004\" src=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/0fdaec7f\/clip_image004_thumb.jpg\" width=\"710\" height=\"185\" \/><\/a><\/span><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">One obvious difference is that the columnstore index execution leveraged parallelism.<span style=\"mso-spacerun: yes\">&#160; <\/span>The query also benefited from batch execution mode:<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><span style=\"mso-no-proof: yes\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/7cb9bfd2\/clip_image006.jpg\"><img decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"clip_image006\" border=\"0\" alt=\"clip_image006\" src=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/1470f739\/clip_image006_thumb.jpg\" width=\"736\" height=\"172\" \/><\/a><\/span><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">If I hobble the columnstore index by capping max degree of parallelism, the results (in comparison) are as follows (third row represents the test):<\/font><\/font><\/p>\n<table style=\"border-bottom: medium none; border-left: medium none; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext\" class=\"MsoTableLightShading\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"mso-yfti-irow: -1; mso-yfti-firstrow: yes\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Intended Index Support<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Elapsed Time<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">CPU Time<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Mode<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 0\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Columnstore<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">256 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">1045 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Batch<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 1\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 4\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Nonclustered index<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">34189 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">33322 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Row<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 2; mso-yfti-lastrow: yes\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Columnstore index (MAXDOP 1) \u2013 <\/font><i style=\"mso-bidi-font-style: normal\"><font style=\"font-size: 11pt\">ending up using NCI<\/font><\/i><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">33540 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">34560 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Row<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">&#160;<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Looking at the plan, we see the columnstore index wasn\u2019t used at all:<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><span style=\"mso-no-proof: yes\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/132c5e5a\/clip_image008.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"clip_image008\" border=\"0\" alt=\"clip_image008\" src=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/6b19af3a\/clip_image008_thumb.jpg\" width=\"727\" height=\"187\" \/><\/a><\/span><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">If I force use of the columnstore index with MAXDOP 1, I see:<\/font><\/font><\/p>\n<table style=\"border-bottom: medium none; border-left: medium none; border-collapse: collapse; border-top: medium none; border-right: medium none; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext\" class=\"MsoTableLightShading\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"mso-yfti-irow: -1; mso-yfti-firstrow: yes\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 5\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Index Support<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Elapsed Time<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">CPU Time<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 1\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Mode<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 0\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Columnstore<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">256 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">1045 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Batch<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 1\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 4\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Nonclustered index<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">34189 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">33322 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Row<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 2\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 68\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Columnstore index (MAXDOP 1) \u2013 ending up using NCI<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">33540 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">34560 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; background: silver; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-background-themecolor: text1; mso-background-themetint: 63; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 64\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Row<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 3; mso-yfti-lastrow: yes\">\n<td style=\"border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"167\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt; mso-yfti-cnfc: 4\" class=\"MsoNormal\"><b><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Columnstore index (MAXDOP 1) \u2013 <i style=\"mso-bidi-font-style: normal\">forced <\/i>columnstore index<\/font><\/font><\/span><\/b><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"148\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">29859 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"136\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">30107 ms.<\/font><\/font><\/span><\/p>\n<\/td>\n<td style=\"border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0in; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"115\">\n<p style=\"line-height: normal; margin: 0in 0in 0pt\" class=\"MsoNormal\"><span style=\"color: ; mso-themecolor: text1; mso-themeshade: 191\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Row<\/font><\/font><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">&#160;<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">The plan shows the index is used, but it is row mode (due to capping parallelism):<\/font><\/font><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><span style=\"mso-no-proof: yes\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/57f8828e\/clip_image010.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"clip_image010\" border=\"0\" alt=\"clip_image010\" src=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/6f4386ff\/clip_image010_thumb.jpg\" width=\"746\" height=\"174\" \/><\/a><\/span><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><span style=\"mso-no-proof: yes\"><a href=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/43268a0e\/clip_image012.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"clip_image012\" border=\"0\" alt=\"clip_image012\" src=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/131c388d\/clip_image012_thumb.jpg\" width=\"380\" height=\"187\" \/><\/a><\/span><\/p>\n<p style=\"line-height: 13pt; margin: 0in 0in 10pt\" class=\"MsoNormal\"><font face=\"Calibri\"><font style=\"font-size: 11pt\">Looping back to the inciting discussion \u2013 even with a supporting nonclustered index, this specific query which scanned all 123 million rows and returned a smaller result set with aggregated values performed significantly better when using a columnstore index <i style=\"mso-bidi-font-style: normal\">in conjunction with<\/i> batch execution mode. <\/font><\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I gave a presentation on columnstore indexing last week and one question I received was regarding the performance of a (hypothetical) narrow, supporting nonclustered index versus a columnstore index.&#160; We discussed how nonclustered indexes were still going to be more effective for specific types of queries (for example \u2013 singleton operations, smaller range scans, etc.).&#160; [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-503","post","type-post","status-publish","format-standard","hentry","category-performance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index - Joe Sack<\/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\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index - Joe Sack\" \/>\n<meta property=\"og:description\" content=\"I gave a presentation on columnstore indexing last week and one question I received was regarding the performance of a (hypothetical) narrow, supporting nonclustered index versus a columnstore index.&#160; We discussed how nonclustered indexes were still going to be more effective for specific types of queries (for example \u2013 singleton operations, smaller range scans, etc.).&#160; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/\" \/>\n<meta property=\"og:site_name\" content=\"Joe Sack\" \/>\n<meta property=\"article:published_time\" content=\"2012-03-08T02:32:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-03T04:32:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/3212f805\/clip_image002_thumb.jpg\" \/>\n<meta name=\"author\" content=\"Joseph Sack\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joseph Sack\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/\",\"name\":\"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index - Joe Sack\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#website\"},\"datePublished\":\"2012-03-08T02:32:00+00:00\",\"dateModified\":\"2013-01-03T04:32:16+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Performance\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/category\/performance\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/\",\"name\":\"Joe Sack\",\"description\":\"SQL Server Performance Tuning, High Availability and Disaster Recovery Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648\",\"name\":\"Joseph Sack\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g\",\"caption\":\"Joseph Sack\"},\"description\":\"Joe Sack is a Principal Consultant with SQLskills. He has worked as a SQL Server professional since 1997 and has supported and developed for SQL Server environments in financial services, IT consulting, manufacturing, retail and the real estate industry. Prior to joining SQLskills he worked at Microsoft as a Premier Field Engineer supporting very large enterprise customer environments. He was responsible for providing deep SQL Server advisory services, training, troubleshooting and ongoing solutions guidance. His areas of expertise include performance tuning, scalability, T-SQL development and high-availability. In 2006 Joe earned the \u201cMicrosoft Certified Master: SQL Server 2005\u201d certification and in 2008 he earned the \u201cMicrosoft Certified Master: SQL Server 2008\u201d certification. In 2009 he took over responsibility for the entire SQL Server Microsoft Certified Master program and held that post until 2011. He was given the SQL Server MVP award in 2013.\",\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/joe\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/josephsack\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/joe\/author\/joe\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index - Joe Sack","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\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/","og_locale":"en_US","og_type":"article","og_title":"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index - Joe Sack","og_description":"I gave a presentation on columnstore indexing last week and one question I received was regarding the performance of a (hypothetical) narrow, supporting nonclustered index versus a columnstore index.&#160; We discussed how nonclustered indexes were still going to be more effective for specific types of queries (for example \u2013 singleton operations, smaller range scans, etc.).&#160; [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/","og_site_name":"Joe Sack","article_published_time":"2012-03-08T02:32:00+00:00","article_modified_time":"2013-01-03T04:32:16+00:00","og_image":[{"url":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-content\/uploads\/windows-live-writer\/comparing-query-performance-when-using-a\/3212f805\/clip_image002_thumb.jpg"}],"author":"Joseph Sack","twitter_misc":{"Written by":"Joseph Sack","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/","url":"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/","name":"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index - Joe Sack","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#website"},"datePublished":"2012-03-08T02:32:00+00:00","dateModified":"2013-01-03T04:32:16+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/comparing-query-performance-when-using-an-ideal-nonclustered-index-versus-columnstore-index\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/joe\/"},{"@type":"ListItem","position":2,"name":"Performance","item":"https:\/\/www.sqlskills.com\/blogs\/joe\/category\/performance\/"},{"@type":"ListItem","position":3,"name":"Comparing Query Performance when using an \u201cideal\u201d Nonclustered Index versus Columnstore Index"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/joe\/","name":"Joe Sack","description":"SQL Server Performance Tuning, High Availability and Disaster Recovery Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/joe\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/533eb0113a15fb5a6e8067a49e4ae648","name":"Joseph Sack","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/joe\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a4b39a7719a6bfff1add3ec00527810734579ee114d6d983e8e68f937b77be96?s=96&d=mm&r=g","caption":"Joseph Sack"},"description":"Joe Sack is a Principal Consultant with SQLskills. He has worked as a SQL Server professional since 1997 and has supported and developed for SQL Server environments in financial services, IT consulting, manufacturing, retail and the real estate industry. Prior to joining SQLskills he worked at Microsoft as a Premier Field Engineer supporting very large enterprise customer environments. He was responsible for providing deep SQL Server advisory services, training, troubleshooting and ongoing solutions guidance. His areas of expertise include performance tuning, scalability, T-SQL development and high-availability. In 2006 Joe earned the \u201cMicrosoft Certified Master: SQL Server 2005\u201d certification and in 2008 he earned the \u201cMicrosoft Certified Master: SQL Server 2008\u201d certification. In 2009 he took over responsibility for the entire SQL Server Microsoft Certified Master program and held that post until 2011. He was given the SQL Server MVP award in 2013.","sameAs":["http:\/\/3.209.169.194\/blogs\/joe","https:\/\/twitter.com\/https:\/\/twitter.com\/josephsack"],"url":"https:\/\/www.sqlskills.com\/blogs\/joe\/author\/joe\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts\/503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/joe\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}