Week 9: Understanding Execution Plans Why Execution Plans? 许多人会问什么在SQL Server里需要执行计划, 首先我们来讲下SQL语言,也就是T-SQL. t-sql是一种声明语言. 我们用逻辑的方式来描述我们想要返回哪些数据... Read More
posted @ 2016-01-04 16:49 AlphaQcode Views(163) Comments(0) Diggs(0) Edit
Week 8: Covering Indexes & Tipping Point 当我们需要根据非聚集索引的字段作为条件来检索数据, 但返回的字段又不包含在非聚集索引中. 这种情况, 需要走两遍索引(一遍非聚集,一遍聚集),有时候这样做并不是很有效率,我们可以用Covering Index(包含索... Read More
posted @ 2016-01-04 15:58 AlphaQcode Views(170) Comments(0) Diggs(0) Edit
Week 7: Non-Clustered Indexes 上周谈论的是聚集索引,当我们在一个表上定义一个聚集索引,就等于使用索引列来物理排序表. 除此之外,我们还可以在表上创建多个(最高999)非聚集索引. 我们用字典来比喻一下, 字典是按照拼音字母物理排序的(聚集索引), 当我们不知道某个字... Read More
posted @ 2016-01-04 12:12 AlphaQcode Views(164) Comments(0) Diggs(0) Edit