For the complete documentation index, see llms.txt. This page is also available as Markdown.

Optimizer Trace

Optimizer trace, which records how the optimizer builds a query's execution plan.

Shows a complete optimizer trace example, from enabling optimizer_trace to reading the resulting JSON from INFORMATION_SCHEMA.OPTIMIZER_TRACE.

Explains how to collect large optimizer traces by raising max_allowed_packet and optimizer_trace_max_mem_size.

Provides guidelines for server developers on what and how to write to the optimizer trace, including keeping the JSON valid.

Guides you through reading the JSON optimizer trace, using a simple query to illustrate the join_preparation and join_optimization steps.

Introduces optimizer trace, which produces a JSON document of the optimizer's decisions for SELECT/UPDATE/DELETE queries, its system variables, and the INFORMATION_SCHEMA.OPTIMIZER_TRACE table.

Links to external optimizer trace resources, including a MariaDB Fest 2020 walkthrough talk and the opttrace processing tool.

Last updated

Was this helpful?