SQL Server中的最佳数据优化技术 [英] Best data optimization techniques in SQL Server

查看:110
本文介绍了SQL Server中的最佳数据优化技术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Tuning Adviser建议索引。我不确定是否应该建立所有建议的索引(许多是非群集的)。我担心通过使用这么多索引我会做相反的事情(降级)。有什么建议吗?

I am using Tuning Adviser to suggest indexes. I am not sure should I make all suggested indexes (many are non-clustered). I am afraid that I will do the opposite (degradation) by using so many indexes. Any suggestions ?

推荐答案

根据定义,每个表只能有一个聚簇索引,因为它定义了记录的物理顺序。您通常不希望在不会不断增加的字段上定义聚簇索引(如自动编号字段),因为任何插入值的中间都会导致对该表中记录的物理重新排序。



如果您遇到特定的性能问题,请考虑实施一些推荐的索引 - 我过去曾成功使用过Tuning Adviser。 YMMV。
By definition there can only be one clustered index per table, as that defines the physical order of records. You generally don''t want to define a clustered index on a field that doesn''t constantly increase (like an autonumber field), as any insert into the middle of the values would result in the physical reordering of records in that table.

If you are having specific performance issues, consider implementing some of the recommended indices - I have used the Tuning Adviser successfully in the past. YMMV.


在创建索引以优化数据库之前,您需要确定如何使用索引。你需要找到经常使用的查询,然后你就可以开始创建索引...

请阅读 - SQL Server性能提示和指南 [ ^ ]
Before creating indexes to optimize your database you need to be sure how to use indexes. You need to locate frequently used queries and then you can start creating indexes ...
Please read this - SQL Server Performance Tips and Guidelines[^]


这篇关于SQL Server中的最佳数据优化技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆