I have a sql server 2000 database with some serious performance problems, as well as some likely huge and inefficient queries being run against it.
I'm wondering if there is a query of some sort a person can run on the system tables to find the slowest running queries run against the database, showing the sql, runtime, last run date, etc.
In an old email from someone who is no longer with the company, I saw a screenshot of this report:
That is exactly the kind of thing I am looking for, but have no idea how that report was generated. Wh开发者_如何学JAVAat is the proper method for reviewing queries against your database to discover poor performers?
Update: The report above was in fact generated with SQL Nexus:
http://sqlnexus.codeplex.com/See also this question:
Is there any tool to see the queries run against the database?This is probably a SQL Profiler trace, which is stored in a database table and reported upon. It would entail running a trace (preferably using the trace stored procedures, not manually through SQL Profiler), getting the trace into a database (eg, INSERT INTO SELECT fn_trace_gettable) a then doing various interesting SELECT statements against that.
The hard part is getting the trace parameters right, and getting the trace to run at the right times.
A tool that somewhat automates this process, along with other performance related data, is SQL Nexus from Microsoft, but I never used that against SQL2000.
精彩评论