Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all optimizer rules are documented #16321

Open
hammerhead opened this issue Jul 16, 2024 · 2 comments
Open

Not all optimizer rules are documented #16321

hammerhead opened this issue Jul 16, 2024 · 2 comments
Labels
docs A documentation issue triage An issue that needs to be triaged by a maintainer

Comments

@hammerhead
Copy link
Member

CrateDB version

any

CrateDB setup information

No response

Problem description

The release notes mention a couple of optimizer rules:

5.4.2:

SET optimizer_reorder_hash_join = false
SET optimizer_reorder_nested_loop_join = false

5.8.0:

SET optimizer_move_constant_join_conditions_beneath_join = false
SET optimizer_equi_join_to_lookup_join = true

The session settings page partially documents some of the optimizer rules, such as optimizer_eliminate_cross_join, but the ones mentioned above are missing and I cannot find them anywhere in the documentation.

Steps to Reproduce

Search the docs folder for an occurrence of e.g. optimizer_reorder_nested_loop_join, apart from the release notes:
$ grep -r optimizer_reorder_nested_loop_join docs --exclude-dir docs/appendices/release-notes

Actual Result

Empty result.

Expected Result

There is an overview of all existing optimizer rules, so users can know what is available.

@hammerhead hammerhead added triage An issue that needs to be triaged by a maintainer docs A documentation issue labels Jul 16, 2024
@matriv
Copy link
Contributor

matriv commented Jul 16, 2024

You can see the settings with:

select name, setting, short_desc, from pg_catalog.pg_settings where name LIKE 'optimizer%'

but currently, we don't document them on purpose, as it's considered experimental to switch off a rule as there are cases where turning off an optimizer rule can break a query.

@matriv
Copy link
Contributor

matriv commented Jul 16, 2024

But we could indeed document how one can find these settings and clearly mention that it's experimental to disable randomly those optimizer rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs A documentation issue triage An issue that needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants