Before #192, explain in optd by default enumerates all join orders. The functionality was added in order to ensure the current join commute + assoc rule can enumerate all join orders. However, the implementation of join order enumeration is super slow and was opt-in by default when explaining. After removing this functionality, TPC-H test suite is 10x faster on my local setup.
- Find better way to enumerate all join orders (avoid generating all bindings)?
- Have a flag + SQL syntax in the optimizer to enable/disable join order enumeration during explain?
- Test how fast is the cascades optimizer to enumerate all join orders, and look into if we need macro rules to do join reordering.