Notice: We've updated our Privacy Policy, effective November 14, 2024.

Config - Disabled features

Check Frequency

Every 30 minutes

Default Configuration

Detects when Postgres parameters that control query planning features are disabled for the entire server, and creates an issue with severity "info". Resolves once all planner features are enabled globally.

This check is enabled by default.

Guidance

Impact

Postgres supports a number of ways to execute most queries, and has settings that can control which mechanisms are enabled. If a certain mechanism is being chosen but is not effective, it may be tempting to turn it off, but doing so will likely have unexpected impact on other (current or future) queries by preventing efficient plans.

Solution

Re-enable the setting and find another way to address the performance issues that led to the setting override in the first place. Consider these approaches:

  • Rewrite queries

    Rewriting your query more efficiently may naturally lead to a better plan. If the query has modest performance impact on your system and you have integrated Automated EXPLAIN, you can investigate a rewrite by opening an interactive session to your database, re-enabling the setting for the session with SET , running the query, and reviewing the plan in pganalyze once it is available after a few minutes.

  • Ensure up-to-date stats

    If the query is referencing tables for which ANALYZE has not run recently, it may lead to a bad plan. Check whether the queried tables have correct statistics, and possible tune your autovacuum ANALYZE settings or adjust statistics targets.

  • Optimize the schema

    You may need to add indexes or use CREATE STATISTICS to give Postgres more information about your data. You can run the query with the setting re-enabled, as above, and investigate index check recommendations.

  • Use session-local overrides

    If the other approaches do not solve the problem, you can use session-local SET commands instead to affect specific queries only. This gives you the same benefits without impacting other queries. Make sure you use SET LOCAL (if within a transaction) or use RESET after the query completes.


Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →