explain

package
v1.49.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package explain provides EXPLAIN query plan generation for the FDW.

This package formats query execution plans in Postgres-compatible format, including cost estimates and row count predictions. It supports generating both default plans and plans marked as unsupported to guide Postgres query planner decisions.

Index

Constants

This section is empty.

Variables

View Source
var Unsupported = Explain{"Unsupported", "irrelevant", expensive, expensive, expensive, expensive}.String()

Unsupported is a pre-formatted EXPLAIN plan with extremely high cost. This is used to discourage Postgres from selecting unsupported query plans.

Functions

This section is empty.

Types

type Explain

type Explain struct {
	Operation                    string
	TableName                    string
	StartupCost                  float32
	TotalCost                    float32
	EstimatedRows                int32
	EstimatedAverageWidthInBytes int32
}

Explain represents a Postgres EXPLAIN query plan with cost and row estimates.

func Default

func Default(operation, tableName string) Explain

Default returns a default explain plan with conservative cost estimates.

func (Explain) String

func (e Explain) String() string

String formats the explain plan in Postgres EXPLAIN output format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL