摘要: 0.参考文献http://msdn.microsoft.com/zh-cn/library/ms172984(SQL.90).aspx1.实验数据我们将利用AdvantureWords2008R2中的Sales.SalesOrderDetail表,其中有12万条数据,非常适合用于测试。不过我们不直接在这张表上做测试,因为这张表上已经有索引了。我们需要新建一张表,将该表中的数据导入我们新建的test和test2表。test和test2的创建方法有两种,我们选择第二种。View Code --实验1:使用INSERT INTO tablename(col1,col2...) SELECT 往已存在 阅读全文
posted @ 2012-07-19 16:09 xwdreamer 阅读(6372) 评论(0) 推荐(0) 编辑
摘要: 引用:http://msdn.microsoft.com/en-us/library/ms190969(SQL.105).aspx正文An Index Allocation Map (IAM) page maps the extents in a 4-gigabyte (GB) part of a database file used by an allocation unit. An allocation unit is one of three types(allocation unit 有三种类型,分别是IN_ROW_DATA,LOB_DATA,ROW_OVERFLOW_DATA):IN 阅读全文
posted @ 2012-07-19 13:31 xwdreamer 阅读(1335) 评论(0) 推荐(0) 编辑
摘要: 参考文献Difference between an Index and a Primary Key本质区别首先primary key跟unique都是Constraints,属于logical object,而index则是physical object,会占用index page并被保存在磁盘上。Primary key Constraints和unique ConstraintsPrimary key Constraints和unique Constraints都需要保证列是唯一的,不能有重复值,但是一张表只能有一个Primary key Constraints,但是可以有多个unique 阅读全文
posted @ 2012-07-19 10:08 xwdreamer 阅读(7101) 评论(0) 推荐(3) 编辑