Dynatrace monitors the response time and failure rate of all SQL statements executed by your applications. The overall response time of each database service in your environment is detailed in the Response time chart at the bottom of each database service page (see example below).
To understand which SQL statements are executed on the database service, and to know how well these statements perform, click the Analyze database activity button beneath the Response time chart to access the Details page.
All relevant database statements executed during the last 30 minutes are listed in the Database statements section at the bottom of the Details page. By default, database statements are sorted based on median response time. Alternatively, you can sort database statements based on number of executions, failure rate, total time, or slowest response time.
Click any statement to view full details:
In addition to response times, failure rate and number of executions, Dynatrace shows you details, like the number of rows retrieved. Of course Dynatrace also tells you which service executed the statement and at what frequency.
You can also filter the statements that you are interested in. Click any database method, for example a query, to view only the query statements.
The real power of the new database analysis view reveals itself when it comes to analyzing performance degradation. You can immediately see which statement is responsible for a given slowdown. In the example below, the detected slowdown was caused by a single statement (
delete from Booking where id=?). The statement that caused the database slowdown was executed by the JourneyService.
Analyze database errors
The failure rate chart on each database Service page features a View details of failures button. In the example service shown below, note the overall failure rate (3.11%) of the database. The
Modificationmethod is listed as the Request with highest failure rate. Click the
Modificationmethod to see why this method's requests are failing.
On the Method details page of the
Modification request, you can see immediately that a single statement is responsible for all errors (see first statement listed in the image below).
Click the View details of failures button to understand the root cause of the failures. Dynatrace shows you that the cause of the failure rate on this service is a MySQL syntax error exception. This gives your developers all the information they need to resolve this issue and eliminate future errors.