views:

78

answers:

2

I am a .NET developer with average SQL skills. I am working on a web app that is 'database heavy'. I have been using the profiler to debug queries and procs. Is there a way to use this tool to look at performance of a query / procedure.

How do I make the most of the SQL Profiler?

I am using SQL Server 2008.

+2  A: 

There are no hard and fast rules per say as it depends on the type of database system your a working with.

As a general starting point with SQL Server performance tuning you will find the following reference to be very useful indeed. It contains a variety of considerations and instructions.

http://www.brentozar.com/sql-server-performance-tuning/

Also take a look at the following article, "Identifying Performance issues using SQL Server Profiler"

http://vyaskn.tripod.com/analyzing_profiler_output.htm

If you need additional assistance just drop me a line.

John Sansom
Thank you for the links.
Nick
@Nick: You're welcome.
John Sansom
+1  A: 

I am not familiar with sql serer 2008, but in sql server 2005 your best bet is the "Display Execution Plan" feature. I will let you know what parts of your query are taking up the most time. Typically adding indexes will help immensely and this tool will help you identify where they are most needed.

KClough
True, but you'd have to identify which queries/batches are having performance to start with. And better to measure than guess. This is where Profiler is handy, you attach it to your server, filter only on queries lasting longer than an arbitrary time (say start at 5 sec), let it monitor for 10 minutes, then aggregate the result. The top query is where you should probably start, and first you look at its plan, indeed. Mileage may vary, of course.
Remus Rusanu

related questions