2012年2月15日 星期三

SQL Server 2012 (Denali) Columnstore Indexes


從去年的Tech Days 在看過 SQL Server 2012 (Denali) 之後,看到了有很多的新功能!都很期待著要使用。十一月 SQL Server 2012 RC0 出來後,首先跟著MS測試了Columnstore indexes 這個特殊的功能。一些紀錄如下:


I. 基於過去在資料倉儲的查詢中,以Row base的查詢效率不彰,
進而調整出以
Column為基礎的資料索引來進行查詢
i. 壓縮效率較高
ii. 只需儲存較少的資訊在記憶體中
iii. 可處理1024Columns
iv. Columnstore index屬於nonclustered index
II. 以欄位儲存的索引機制有以下限制
i. 不能使用INSERTUPDATEDELETEMERGE或者BULK LOAD
ii. 不能設定在UniqueidentifierBinaryVarbinaryntexttextimagevarchar(max)nvarchar(max)rowversiontimestamp以及xml 等資料型態
III. 可以透過以下幾種方式來新增資料:
i. 建立Partition並以切換Partition的方式存放新資料
ii. 取消Columnstore Index,新增資料後再重建一次
iii. 透過Union All 來查詢已建立Columnstore Index與尚未建立Columnstore Index的資料

Columnstore Indexes 這個新功能,可以改善原本資料倉儲中查詢過慢的問題。不論是Cube process或者直接查詢都有較好的改善!





沒有留言: