In Neon, you can recover a 100 TB database in 1 second. No more fear of breaking production
Docs/Platform/Active queries

Monitor active queries

new

View and analyze running queries in your database

Early Access

This feature is available for members of our Early Access Program. Read more about joining up here.

You can monitor active queries for your Neon project from the Monitoring page in the Neon Console.

  1. In the Neon Console, select a project.
  2. Go to Monitoring.
  3. Select the Active Queries tab.

The Active Queries view displays up to 100 currently running queries for the selected Branch, Compute, and Database. Use the Refresh button to update the list with the latest active queries.

Neon active queries tab

The Active Queries view is powered by the pg_stat_activity Postgres system view, which is available in Neon by default. To run custom queries against the data collected by pg_stat_activity, you can use the Neon SQL Editor or any SQL client, such as psql.

For details on pg_stat_activity, see pg_stat_activity in the PostgreSQL documentation.

active queries retention

In Neon, the pg_stat_activity system view only holds data on currently running queries. Once a query completes, it no longer appears in the Active Queries view. If your Neon compute scales down to zero due to inactivity, there will be no active queries until a new connection is established and a query is run.

Last updated on

Was this page helpful?