New Slow Queries
Detects queries whose average execution time in the last 24 hours is over the specified threshold of
50ms and creates an issue with severity "info".
Ignores queries that are still running or that have executed fewer than
This check is enabled by default. These parameters can be tuned in the Configure section of the Alerts & Check-Up page.
Slow queries usually consume more CPU or I/O resources; can hold locks, blocking other queries; and lead to bad user experience due to poor responsiveness in your application. They may also be symptoms of other issues like table bloat or hardware problems.
If overall system performance is slow, due to either higher workload, operational issues, or hardware problems, this slow query may be just a symptom, and not a problem to fix directly. Check the current workload on the Query Performance overview, check any wait events on the Wait Events page, or check System metrics for overall activity.
If a query lacks the necessary indexes to execute efficiently, it may take longer and use more I/O than necessary, causing a negative impact on the whole system. Check the query page to review indexing recommendations.
If the the data accessed by a query changes dramatically (either grows in size or changes in terms of statistics relevant to query planning ), the query may start performing poorly. You may need to change indexes, change the default or per-column statistics targets , or create auxiliary statistics to give Postgres more information about the distribution of the underlying data. You should also check vacuum activity on the tables involved to make sure bloat is under control and that the tables have been analyzed recently.
The query may be executing slowly due to an inefficient plan for other reasons. Review the query execution plans and Explain Insights listed for the query.
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →