用与不用聚集索引的区别 sql用例
摘要:
对数据表创建了聚集索引后,当向表中插入数据时,数据库会对数据按照索引进行重新排序存储。 所以,对于频繁执行insert操作的表,在对聚集索引的创建上,需要做权衡,有时需考虑不建立聚集索引。如下用例说明了使用与不使用聚集索引时,数据的存储情况。if not object_id('test_no_cx') is null drop table test_no_cxif not object_id('test_has_cx') is null drop table test_has_cx--创建一个不含索引的表test_no_cxcreate table test_n 阅读全文
posted @ 2011-11-17 19:12 buguge 阅读(540) 评论(0) 推荐(0)
浙公网安备 33010602011771号