使用Clustered ColumnStore Index插入唯一值
16lz
2021-01-22
I would like to know how I would go about of creating my table or choosing an insert that make sure that I do not get duplicate values.
我想知道如何创建我的表或选择一个插件,以确保我没有得到重复的值。
create table test.dbo.test
product,
time,
primary key(product, time)
go
When using Clustered ColumnStore I can not have any unique constraints to know that the data that has been inserted is unique. Is there another way to check this?
使用Clustered ColumnStore时,我不能有任何唯一约束来知道已插入的数据是唯一的。还有另一种检查方法吗?
1 个解决方案
#1
4
Here is a work-around that uses materialized views.
这是一个使用物化视图的变通方法。
http://sqlwithmanoj.com/2014/07/24/maintaining-uniqueness-with-clustered-columnstore-index-sql-server-2014/
http://sqlwithmanoj.com/2014/07/24/maintaining-uniqueness-with-clustered-columnstore-index-sql-server-2014/
更多相关文章
- 连接WCF报EntityFramework.SqlServer 错误的解决方法
- SQL SERVER日志文件已满处理方法
- SQL SERVER 日志已满的处理方法
- 抱SQL SERVER大腿之我爱用视图(对大数据量的管理)
- 创建视图时ORA-01031
- 一种在t-SQL中选择两个日期之间的日期的方法
- 使用PDO创建长插入SQL查询的最佳方法
- MySQL This function has none of DETERMINISTIC, NO SQL...错误
- mysql随机取出若干条记录的实用方法