技术控

    今日:134| 主题:49289
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] SQL SERVER – Fix Error Msg 35336 Working with ColumnStore Indexes

[复制链接]
流念你眉间 发表于 2016-10-5 16:02:12
74 1

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
Since my consulting have started around performance tuning, I am able to see a number of customers who want to start using the new capabilities of SQL Server for their existing application as they plan to do an upgrade of their infrastructure. In one of engagement with a bank, who was upgrading their SQL Server 2012 to SQL Server 2016, they were interested in knowing how some of the new InMemory or even usage of ColumnStore Indexes can be used. It was an interesting conversation that started which I am using as a blog here.
  I confronted them with the question on their inability to use a Non-Clustered ColumnStore index even in SQL Server 2012? They said they had evaluated and then saw that table was rendered read only once the Index was created. It made complete sense and as I planned for their session on a SQL Server 2016 developer edition, I said now the non-clustered columnstore indexes were actually now updateable.
  To start playing with the demo, I just went about creating a table and then a non-clustered Columnstore index based on my memory of the syntax. It is sometimes customary for me to do the same to write code randomly in front of the customer. To my surprise, I got the following error:
   Msg 35336, Level 15, State 1, Line 1
The statement failed because specifying a key list is missing when creating an index.
Create the index with specifying key list.

   
SQL SERVER – Fix Error Msg 35336 Working with ColumnStore Indexes-1 (interested,customers,developer,actually,existing)

  As you can see, the first reaction seeing the “Red” error message was that I was doing something terribly wrong. It was a face-palm reaction for me. But I took a deep breath and saw that the error message it had what I was missing. I changed the same code to the column key values as shown below, it just worked fine:
  [code]CREATE NONCLUSTERED COLUMNSTORE INDEX
t_non_clust_colstor_cci on t_non_clust_colstor (acc_description, acc_type)
WITH (DATA_COMPRESSION= COLUMNSTORE);[/code]  I couldn’t get over to why I did that code and on my way to the airport, I was trying to figure out the reason. Then it suddenly struck me that the key values are not applicable for Clustered ColumnStore Indexes and that was in my mind. Now I felt relaxed as I boarded the flight.
  Thanks to SQL Server for guiding me with a self-explanatory error message. I am sure you have in the past seen a number of error messages for debugging made easier. Do let me know if you ever got to such hero moments and found yourself in a soup? Do share via comments.
   Reference: Pinal Dave ( http://blog.sqlauthority.com )
友荐云推荐




上一篇:小白学react之页面BaseLayout框架及微信的坑
下一篇:SGiOSViews
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

天涯行 发表于 2016-10-6 19:51:13
楼下是射手
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表