创建完分区表插入数据后,进行检索时
select * from table where id='111'
后面还需要加分区key(datetime)做条件吗?
即:select * from table where id='111' and datetime = '2009/12/07'
还有创建完分区表 还要创建分区索引吗?
什么时候创建分区索引啊?
什么情况下能看出分区后的表的性能? 是数据要超过几万吗?
...全文
12112打赏收藏
分区key
创建完分区表插入数据后,进行检索时 select * from table where id='111' 后面还需要加分区key(datetime)做条件吗? 即:select * from table where id='111' and datetime = '2009/12/07' 还有创建完分区表 还要创建分区索引吗? 什么时候创建分区索引啊? 什么情况下能看出分区后的表的性能? 是数据要超过几万吗?
举个例子
1.select * from table where id='111'
2.select * from table where id='111' and datetime = @datetime
3.select * from table where datetime = @datetime
你觉得那个相对更快些?哪个最慢呢?