Skip to main content

Dashboard Configuration

This extension requires activation via the PlanetScale dashboard before it can be used. It is loaded through session_preload_libraries and does not require a database restart. To enable auto_explain:
1
From the PlanetScale organization dashboard, select the desired database
2
Navigate to the Clusters page from the menu on the left
3
Choose the branch whose extensions you’d like to configure in the “Branch” dropdown
4
Select the Extensions tab
5
Enable auto_explain and configure its parameters
6
Click Queue extension changes to apply the configuration
7
Once you’re ready to apply the changes, click “Apply changes

Parameters

auto_explain.log_min_duration

  • Type: Integer (milliseconds)
  • Default: -1
  • Description: Minimum statement duration to log a plan for. Set to -1 to disable logging by duration.

auto_explain.log_analyze

  • Type: Boolean
  • Default: false
  • Description: Uses EXPLAIN ANALYZE for logged plans to include actual execution statistics.

auto_explain.log_buffers

  • Type: Boolean
  • Default: false
  • Description: Includes buffer usage statistics in logged plans.

auto_explain.log_wal

  • Type: Boolean
  • Default: false
  • Description: Includes WAL usage statistics in logged plans.

auto_explain.log_timing

  • Type: Boolean
  • Default: true
  • Description: Includes per-node timing information in logged plans.

auto_explain.log_triggers

  • Type: Boolean
  • Default: false
  • Description: Includes trigger execution statistics in logged plans.

auto_explain.log_verbose

  • Type: Boolean
  • Default: false
  • Description: Uses EXPLAIN VERBOSE output for logged plans.

auto_explain.log_format

  • Type: Select
  • Options: text, xml, json, yaml
  • Default: text
  • Description: Output format used when logging plans.

auto_explain.log_level

  • Type: Select
  • Default: log
  • Description: Log severity used when writing query plans.

auto_explain.log_nested_statements

  • Type: Boolean
  • Default: false
  • Description: Logs plans for nested statements that run inside functions.

auto_explain.sample_rate

  • Type: Decimal
  • Default: 1
  • Minimum: 0
  • Maximum: 1
  • Description: Fraction of statements that are sampled for plan logging.

Usage

auto_explain is not installed with CREATE EXTENSION. After enabling it in the dashboard, sessions load it through session_preload_libraries. You can verify and tune settings in SQL:
Logged plans appear in your cluster logs when statements match the configured thresholds.

External Documentation

For more detail about auto_explain behavior and parameter semantics, see the official PostgreSQL documentation.