Not all optimizer rules are documented
CrateDB version
any
CrateDB setup information
No response
Problem description
The release notes mention a couple of optimizer rules:
SET optimizer_reorder_hash_join = false
SET optimizer_reorder_nested_loop_join = false
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.
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.
But we could indeed document how one can find these settings and clearly mention that it's experimental to disable randomly those optimizer rules.