Skip to content

DOCS-3940 Add "Understanding and Influencing Optimizer Decisions" page - #749

Open
mariadb-udaydubey wants to merge 3 commits into
mainfrom
DOCS-3940-understanding-optimizer-decisions
Open

mariadb-udaydubey wants to merge 3 commits into
mainfrom
DOCS-3940-understanding-optimizer-decisions

Conversation

@mariadb-udaydubey

Copy link
Copy Markdown
Contributor

Add a task-oriented hub page under Optimization and Tuning that walks users through seeing, understanding, and influencing the query plan:
EXPLAIN -> ANALYZE -> optimizer trace -> hints / optimizer_switch, with content-refs to the existing reference pages.
Add the SUMMARY.md nav entry as a sibling of Query Optimizer, Optimizer Hints, and Optimizing Queries.

Add a task-oriented hub page under Optimization and Tuning that walks
users through seeing, understanding, and influencing the query plan:
EXPLAIN -> ANALYZE -> optimizer trace -> hints / optimizer_switch, with
content-refs to the existing reference pages. Add the SUMMARY.md nav
entry as a sibling of Query Optimizer, Optimizer Hints, and Optimizing
Queries.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mariadb-stefan-hinz mariadb-stefan-hinz added the documentation Improvements or additions to documentation label Jul 15, 2026
Answer the MDEV-13127 sub-question about the optimizer's role when an
engine (such as ColumnStore) executes a whole SELECT via its own select
handler: the server still parses and prepares the statement and lets the
engine decide whether it can run the query, but the cost-based optimizer
is bypassed and execution is delegated to the engine. Note that EXPLAIN
shows PUSHED SELECT / PUSHED DERIVED and that trace, hints, and
optimizer_switch do not apply to the pushed-down part.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mariadb-udaydubey mariadb-udaydubey self-assigned this Jul 17, 2026
Reviewer feedback on PR #749: add FORCE INDEX as another way to influence
the plan, mention optimizer_switch before optimizer hints, and describe
the optimizer cost model rather than only linking it.

Reorder the optimizer_switch bullet and content-ref ahead of hints. Add a
FORCE INDEX bullet and content-ref noting it is an index hint in the FROM
clause, distinct from /*+ ... */ hints, that restricts the optimizer to
the listed indexes and makes it prefer one over a full table scan. Add a
cost model bullet covering the tunable cost constants, engine-level costs
being global and per-engine, and the two session-settable SQL costs.
Rewrite the closing guidance for four mechanisms instead of two, and
describe the cost model link under See also.

Generalize the pushdown hint to "the mechanisms in Influence the plan"
so it does not go stale as that list grows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants