Module mz_adapter::optimize::index

source ·
Expand description

Optimizer implementation for CREATE INDEX statements.

Note that, in contrast to other optimization pipelines, timestamp selection is not part of index optimization. Instead users are expected to separately set the as-of on the optimized DataflowDescription received from GlobalLirPlan::unapply. Reasons for choosing to exclude timestamp selection from the index optimization pipeline are:

(a) Indexes don’t support non-empty until frontiers, so they don’t provide opportunity for optimizations based on the selected timestamp. (b) We want to generate dataflow plans early during environment bootstrapping, before we have access to all information required for timestamp selection.

None of this is set in stone though. If we find an opportunity for optimizing indexes based on their timestamps, we’ll want to make timestamp selection part of the index optimization again and find a different approach to bootstrapping.

See also MaterializeInc/materialize#22940.

Structs§

  • The (final) result after MIR ⇒ LIR lowering and optimizing the resulting DataflowDescription with LIR plans.
  • The (sealed intermediate) result after:
  • A wrapper of index parts needed to start the optimization process.