哪些工具可用于测试SQL语句性能? [英] What tools are available to test SQL statement performance?

查看:685
本文介绍了哪些工具可用于测试SQL语句性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在对性能的永无止境的搜索(以及我自己的拙劣的经验)中,我学到了一些可能会降低SQL语句性能的东西.

In the never-ending search for performance (and my own bludgeoning experience), I've learnt a few things that could drag down the performance of a SQL statement.

强迫性子查询障碍
进行疯狂的类型转换(并将其嵌套到遗忘中)
按上述疯狂类型转换的汇总函数进行分组依据
fldID在哪里(从我的500万记录表中选择一切")

Obsessive Compulsive Subqueries Disorder
Doing crazy type conversions (and nest those into oblivion)
Group By on aggregate functions of said crazy type conversions
Where fldID in (select EVERYTHING from my 5mil record table)

我通常使用MSSQL.哪些工具可用于测试SQL语句的性能?这些工具是否内置并且特定于每种类型的DB服务器?还是有可用的通用工具?

I typically work with MSSQL. What tools are available to test the performance of a SQL statement? Are these tools built in and specific to each type of DB server? Or are there general tools available?

推荐答案

SQL事件探查器(内置):

SQL Profiler (built-in): Monitoring with SQL Profiler

SQL Benchmark Pro (商用)

SQL Server 2008具有新的数据收集器

SQL Server 2008 has the new Data Collector

SQL Server 2005(及以后)缺少动态管理视图(DMV)索引,该索引可能非常有用(但仅适用于当前在计划缓存中的查询计划):

SQL Server 2005 (onwards) has a missing indexes Dynamic Management View (DMV) which can be quite useful (but only for query plans currently in the plan cache): About the Missing Indexes Feature.

还有SQL Server 数据库引擎优化顾问,它可以合理的工作(只是不执行建议的所有内容!)

There is also the SQL Server Database Engine Tuning Advisor which does a reasonable job (just don't implement everything it suggests!)

这篇关于哪些工具可用于测试SQL语句性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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