在北欧使用 SQL Azure P1 Premium V12,我可以执行以下操作:
CREATE CLUSTERED COLUMNSTORE INDEX cci_Simple ON SimpleTable;
但不是这个:(使用 Microsoft.SqlServer.SqlEnum,Version=12.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91)
var t = new Table(db, "SimpleTable");
// ... Add Columns
t.Create()
var index = new Index(t, "cci_" + t.Name)
{
IndexType = IndexType.ClusteredColumnStoreIndex,
};
index.Create();
我得到:
Microsoft.SqlServer.Management.Smo.FailedOperationExceptionCreate failed for Index 'cci_SimpleTable'.
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl()
at Microsoft.SqlServer.Management.Smo.Index.Create()
at ...
Microsoft.SqlServer.Management.Smo.UnsupportedEngineTypeException
目标引擎类型不支持该对象或其属性之一。
引用文献;
https://msdn.microsoft.com/library/gg492153.aspx
http://www.nikoport.com/2014/12/12/azure-columnstore-1-the-initial-preview-offering/
最佳答案
不理想:
db.ExecuteNonQuery(string.Format("Create Clustered Columnstore Index CC_{0} on dbo.{0}", table.Name));
sqlInjection 转义等
关于c# - 为 P1 SQL 数据库创建 Azure ClusteredColumnStoreIndex 的 C# SMO 方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31841775/