Call Us: US - +1 845 478 5244 | UK - +44 20 7193 7850 | AUS - +61 2 8005 4826

Monitor and troubleshoot VoIP performance

 Query Reporting via APM Solutions

One of the great features of many application performance management (APM) tools is their ability to track SQL queries. For example, Retrace tracks SQL queries across multiple database providers, including SQL Server.

Retrace can tell you how many times a query has been executed, how long it takes on average, and what transactions are calling it. This is really valuable information for SQL performance tuning.

APM solutions collect this data by doing lightweight performance profiling against your application code at runtime.

Below is a screenshot from Retrace’s application dashboard that shows for a particular application, which SQL queries take the longest.

SQL Performance Tuning With Retrace Top Queries


Retrace collects performance statistics about every single SQL query being executed. You can search for specific queries to hunt down potential problems.

Retrace View All SQL Queries


By selecting an individual query, you can see how often that query is called over time and how long it takes. You can also see what web pages use the SQL query and how their performance is impacted by it.

Retrace SQL Performance Over Time


Since Retrace is a lightweight code profiler and captures ASP.NET request traces, it can even show you the full context of what your code is doing.

Below is a captured trace that shows all of the SQL queries and other details about what the code was doing. Retrace can even show log messages within this same view. Also, notice that it shows the server address and database name the query is being executed on. You can also see how many records were returned.

Retrace Web Transaction Trace


As you can see, Retrace provides comprehensive SQL reporting capabilities as part of its APM capabilities. It also provides multiple monitoring and alerting features around SQL queries.

Pros: Detailed reporting across apps, per app, and per query. Can show transaction traces detailed how queries are used. Starts at just $10 a month. Is always running once installed.
Cons: Does not provide the number of reads or writes per query.

3. SQL Server Profiler (DEPRECATED!)

The SQL Server Profiler has been around for a very long time. It is very useful if you are trying to see in real time what SQL queries are being executed against your database.

NOTE: Microsoft has announced that SQL Server Profiler is being deprecated!

SQL Profiler captures very detailed events about your interaction with SQL Server.

  • Login connections, disconnections, and failures
  • SELECT, INSERT, UPDATE, and DELETE statements
  • RPC batch status calls
  • Start and end of stored procedures
  • Start and end of statements within a stored procedure
  • Start and end of a SQL batch
  • Errors written to the SQL Server error log
  • A lock acquired or released on a database object
  • An opened cursor
  • Security permission checks