Sql查询分析性能 [英] Sql query analyze for performance
本文介绍了Sql查询分析性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何分析sql查询&提高性能。
是否可以使用 SSMS ??
任何可用的工具??
我尝试了什么:
刚刚在SSMS中检查过但无法找到。
How to analyze sql query & improve its performance.
Is it possible using SSMS ??
Any tools available??
What I have tried:
just checked in SSMS but couldnt find any.
推荐答案
有很多可用的工具,但我主要使用的是:
SQL Server Profiler ,请参阅此处的教程: SQL Server Profiler Step by Step [< a href =http://www.codeproject.com/Articles/21371/SQL-Server-Profiler-Step-by-Steptarget =_ blanktitle =New Window> ^ ]
但我不推荐它,它太复杂且版本特定,开源 ExpressProfiler 更容易使用,请参阅: ExpressProfiler - 主页 [ ^ ]
您还可以在SQL Server Management Studio中测试查询,如下所示:
There is a plethora of tools available, but the ones I use mostly are:
SQL Server Profiler, see tutorial here: SQL Server Profiler Step by Step[^]
But I would not recommend it, it's too complex and version specific, the open-source ExpressProfiler is much easier to use, see: ExpressProfiler - Home[^]
You can also test queries in SQL Server Management Studio like this:
SET STATISTICS IO ON
SET STATISTICS TIME ON
CHECKPOINT
DBCC DROPCLEANBUFFERS
USE [XXX]
SELECT * FROM MyTable
如前所述成员11712753,您可以使用执行计划
:
在Management Studio查询编辑器中,您可以选择显示估计的执行计划或实际执行通过单击查询编辑器工具栏上的显示估计执行计划或包括实际执行计划按钮来计划。
显示图形执行计划(SQL Server Management Studio) [ ^ ]
这篇关于Sql查询分析性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文