Query Analysis with Industry Standard Insights

Query Analysis Dashboard Query Analysis Dashboard

Identify slow queries, N+1 problems, and memory bloat before they impact your users. Scout's query analysis gives you the data you need to optimize database performance.

Query Analysis

Base Database Decisions On Meaningful Data

No guessing at bottlenecks or manually timing operations. Scout's Query Analysis gives you concrete data about your most resource-intensive database operations, so you can make informed decisions about optimization and keep your application running smoothly.

Query Analysis Dashboard Query Analysis Dashboard

Real-time monitoring

Real-time monitoring lets you track your application's throughput while drilling down into specific time periods to investigate performance issues. Whether you're looking at find operations, commits, or custom queries, you'll see exactly how much database time each one consumes.

Database events

Scout automatically detects and alerts on significant changes to database performance. When usage spikes occur – you'll know immediately, with the context you need to quickly diagnose and resolve database bottlenecks.

N+1 Insights

An Industry Standard for Solving N+1 Query Issues

When, instead of a single query, an N amount of individual queries are executed to retrieve related data, this results in a total of N+1 queries. Scout analyzes your traces and shows you the trace found to contain N+1s with UX impacts.

N+1 Insights N+1 Insights

Query impact

See which database queries are consuming the most time and impacting overall performance.

Query bottlenecks

Identify queries causing significant slowdowns within your web endpoints and background jobs.

Slow queries

Track consistently slow-performing queries to prioritize your optimization efforts.

Insights history

Insights From The Past

Scout users can also view past insights related to slow queries, N+1 queries, and memory bloat. These insights have a corresponding trace saved – and with a longer retention period.

Insights History Insights History
We've been able to identify memory leaks and N+1 queries to shave seconds off our most expensive queries and to improve the reliability of our site.
Brett Kushner COO, Don't Tell Comedy
Get Started in Minutes

Add Scout to Your App

Install the agent, deploy, and see your first traces in about 5 minutes.

Get started in under 3 minutes with our Ruby agent.

  1. 1

    Add the gem to your Gemfile:

    gem 'scout_apm'
  2. 2

    Install it:

    bundle install
  3. 3

    Download your customized config file and place it at config/scout_apm.yml.

  4. 4

    Deploy.

Get started in under 3 minutes with our Python agent.

  1. 1

    Install the package:

    pip install scout-apm
  2. 2

    Add Scout to your framework: Django: add "scout_apm.django" first in INSTALLED_APPS. Flask: ScoutApm(app). FastAPI: app.add_middleware(ScoutMiddleware).

  3. 3

    Set your Scout key and app name, then deploy.

Get started in under 3 minutes with our PHP agent.

  1. 1

    Install the Laravel package:

    composer require scoutapp/scout-apm-laravel
  2. 2

    Optionally install the PHP extension:

    sudo pecl install scoutapm
  3. 3

    Set SCOUT_MONITOR, SCOUT_KEY, and SCOUT_NAME in .env, then deploy. Using Symfony? Install scoutapp/scout-apm-symfony-bundle instead.

Get started in under 3 minutes with our Elixir agent.

  1. 1

    Add the dependency to mix.exs:

    {:scout_apm, "~> 2.0"}
  2. 2

    Download your customized config file to config/scout_apm.exs.

  3. 3

    Add instrumentation in lib/your_app_web.ex, then deploy.

Get started in under 3 minutes with our Node.js agent.

  1. 1

    Install the package:

    npm install @scout_apm/scout-apm
  2. 2

    Create scout.js with your app name and key, and require it first in your entry point.

  3. 3

    Add the middleware. Express: expressMiddleware() and errorMiddleware(). NestJS: nestMiddleware() and nestErrorFilter().

  4. 4

    Set SCOUT_KEY and SCOUT_NAME, then deploy.

Prefer one command? npx @scout_apm/wizard signs you up and configures everything.

Ready to Optimize Your App?

Join engineering teams who trust Scout Monitoring for hassle-free performance monitoring. With our 3-step setup, powerful tooling, and responsive support, you can quickly identify and fix performance issues before they impact your users.

Start Monitoring for Free