2011年12月29日

SQLServer性能优化

摘要: SQL Server中一些常见的性能问题:1.在对查询进行优化时,应当尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.我们应当尽量避免使用 left join 和 null 值判断。left join 比 inner join 消耗更多的资源,因为它们包含与 null (不存在)数据匹配的数据,所以如果可以重新编写查询以使得该查询不使用任何 inner join ,则会得到相应的回报。假如有两张示例表:product(product_id int not null,product_type_id int null,...),产品表, product_i 阅读全文

posted @ 2011-12-29 11:40 HelloHongfu 阅读(235) 评论(0) 推荐(0) 编辑

导航