crate icon indicating copy to clipboard operation
crate copied to clipboard

Not all optimizer rules are documented

Open hammerhead opened this issue 1 year ago • 2 comments

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 avatar Jul 16 '24 06:07 hammerhead

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 avatar Jul 16 '24 07:07 matriv

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

matriv avatar Jul 16 '24 07:07 matriv