Description:
Make the optimizer trace for the hypergraph optimizer structured and
machine-readable, similar to the trace produced by the old optimizer.
Today, parts of the hypergraph optimizer trace are emitted as
unstructured text. This can be useful when reading a trace manually,
but it is difficult for tools to parse, compare, visualize, or
summarize. A JSON-based trace should expose the important optimizer
decisions and estimates as structured data instead of embedding them
primarily in free-form messages.
The trace should make it easier to inspect how the hypergraph
optimizer reached a plan, including relevant candidate plans, access
paths, join order choices, cardinality estimates, cost estimates, and
reasons why alternatives were chosen or rejected. The structure does
not need to mirror the old optimizer exactly where the hypergraph
optimizer works differently, but it should provide a stable format
that tools can consume.
The goal is to improve debugging, regression analysis, and
visualization of hypergraph optimizer behavior, making it easier for
developers and advanced users to understand why a particular plan was
chosen.
How to repeat:
NA