QueryPlan

public struct QueryPlan : Sendable

The query execution plan produced by QueryBuilder.explain().

A query plan describes the chosen access path and how many predicates can be pushed down to the index versus evaluated in memory.

  • The chosen access path (index, partition scan, or full scan).

    Declaration

    Swift

    public let strategy: QueryStrategy
  • The number of predicates that must still be evaluated in memory after the initial scan. Fewer residual predicates means faster execution.

    Declaration

    Swift

    public let residualPredicates: Int