DOCS-3940 Add "Understanding and Influencing Optimizer Decisions" page - #749
Open
mariadb-udaydubey wants to merge 3 commits into
Open
mariadb-udaydubey wants to merge 3 commits into
mariadb-udaydubey wants to merge 3 commits into
Conversation
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>
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.