Databases and Slow Queries dashboard

New Relic APM's Databases dashboard shows data for databases and caches being used by the selected application. The dashboard will show individual database transactions as a sortable table, and operations, throughput, and response time as charts. If slow queries have been recorded, they appear in the Slow Queries section at the bottom of the dashboard.

Feature availability

The Databases dashboard is available with any New Relic paid account type.

The Slow Queries feature is available with any New Relic paid account type except Standard.

The Databases dashboard has new features available with the following agent versions:

  • Java 3.14.0 or higher
  • .Net 4.1.134 or higher
  • Node.js 1.17.0 or higher
  • PHP 4.19.0 or higher
  • Python 2.44.0 or higher
  • Ruby 3.11.0 or higher
  • SDK (pending)

If you are using the above listed version of the agent or higher on your servers, you will have access to these new features:

  • The Database dashboard supports multiple database and cache types.
  • The different types are clearly labeled and identified in the operations list, charts, and Slow Queries.
  • You can filter the page to only show operations and charts for a specific database vendor or cache type.
  • You can view a new table for all Database operations, not just the slowest ones.
  • You can view the databases on Service maps.

Viewing Databases dashboard details

To view information about database performance:

  1. From the New Relic menu bar, select APM > (selected app) > Monitoring > Databases.
  2. To show details about an individual operation or query, select the row in the database operations list to expand it
  3. To exit the selected item, select its Close (X) button, or select another row in the list.
screen-slow-sql

APM > (selected app) > Monitoring > Databases: Use this dashboard to view and sort detailed information about database performance and slow queries (if applicable).

Use any of New Relic's standard user interface functions and dashboard features to drill down into detailed information.

The All databases overview shows:

  • Top 5 database operations by wall clock time
  • Database response time
  • Database throughput

The details for individual operations show:

  • Response time
  • Throughput
  • Time consumption by caller

Tip: The Time consumption by caller chart displays a list of the transactions calling the selected operation, with color bars indicating the percentage of time consumed by each caller. To view the Transactions dashboard for a caller transaction, select the color bar for that transaction in the chart.

screen-slow-sql-drilldown

APM > (selected app) > Monitoring > Databases > (selected transaction): Here is an example of the details window for an individual database transaction. If information is available for slow queries, it appears at the bottom of the Database dashboard.

Filtering operations by database vendor

Note: This functionality is dependent on your agent version.

Above the list of database operations, buttons allow you to filter down to a specific database vendor.

  • To filter the contents by database vendor, select its name.
  • To remove the filter, select All.

Displaying all database operations

Note: This functionality is dependent on your agent version.

  • To show all database operations, at the bottom of the operations list, select the Show all database operations table... link. The All database operations table lists all operations recorded, not just the slowest operations.
  • To sort the table by any column, select the column's header.
  • To filter the operations table, use the search box at the top of the table. The table will be filtered in real time as you type.
  • To view details on a specific operation, select the operation name. This returns you to the Databases dashboard with the details for that operation displayed.
  • To return to the dashboard, at the top of the table, select the Back to top link.
screen databases all queries table

APM > (selected app) > Monitoring > Databases > Show all database operations table ...: The All database operations table shows all reported queries within the specified time frame, not just the worst performing.

Deleting traces

You must be the account's Admin or Owner in order to delete the database operations traces from this dashboard.

To delete all traces for your app permanently:

  1. Select the Delete all traces button at the buttom of the database operations list.
  2. Select the confirmation prompt.

Tip: If you are doing general record cleanup, you may also want to delete transaction traces or error traces. This will remove potentially sensitive data while retaining your other application data (such as Apdex, deployment information, etc.).

For more help

Additional documentation resources include:

Join the discussion about New Relic APM in the New Relic Community Forum! The Community Forum is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.