Enum mz_repr::explain::IndexUsageType
source · pub enum IndexUsageType {
FullScan,
DifferentialJoin,
DeltaJoin(DeltaJoinIndexUsageType),
Lookup(GlobalId),
PlanRootNoArrangement,
SinkExport,
IndexExport,
FastPathLimit,
DanglingArrangeBy,
Unknown,
}
Variants§
FullScan
Read the entire index.
DifferentialJoin
Differential join. The work is proportional to the number of matches.
DeltaJoin(DeltaJoinIndexUsageType)
Delta join
Lookup(GlobalId)
IndexedFilter
, e.g., something like WHERE x = 42
with an index on x
.
This also stores the id of the index that we want to do the lookup from. (This id is already
chosen by LiteralConstraints
, and then IndexUsageType::Lookup
communicates this inside
CollectIndexRequests
from the IndexedFilter
to the Get
.)
PlanRootNoArrangement
This is a rare case that happens when the user creates an index that is identical to an
existing one (i.e., on the same object, and with the same keys). We’ll re-use the
arrangement of the existing index. The plan is an ArrangeBy
+ Get
, where the ArrangeBy
is requesting the same key as an already existing index. (export_index
is what inserts
this ArrangeBy
.)
SinkExport
The index is used for directly writing to a sink. Can happen with a SUBSCRIBE to an indexed view.
IndexExport
The index is used for creating a new index. Note that either a FullScan
or a
PlanRootNoArrangement
usage will always accompany an IndexExport
usage.
FastPathLimit
When a fast path peek has a LIMIT, but no ORDER BY, then we read from the index only as many
records (approximately), as the OFFSET + LIMIT needs.
Note: When a fast path peek does a lookup and also has a limit, the usage type will be
Lookup
. However, the smart limiting logic will still apply.
DanglingArrangeBy
We saw a dangling ArrangeBy
, i.e., where we have no idea what the arrangement will be used
for. This is an internal error. Can be a bug either in CollectIndexRequests
, or some
other transform that messed up the plan. It’s also possible that somebody is trying to add
an ArrangeBy
marking for some operator other than a Join
. (Which is fine, but please
update CollectIndexRequests
.)
Unknown
Internal error in CollectIndexRequests
or a failed attempt to look up
an index in DataflowMetainfo::used_indexes
.
Implementations§
source§impl IndexUsageType
impl IndexUsageType
pub fn display_vec<'a, I>(usage_types: I) -> impl Display + Sized + 'awhere
I: IntoIterator<Item = &'a IndexUsageType>,
Trait Implementations§
source§impl Arbitrary for IndexUsageType
impl Arbitrary for IndexUsageType
§type Parameters = (<DeltaJoinIndexUsageType as Arbitrary>::Parameters, <GlobalId as Arbitrary>::Parameters)
type Parameters = (<DeltaJoinIndexUsageType as Arbitrary>::Parameters, <GlobalId as Arbitrary>::Parameters)
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Union<BoxedStrategy<IndexUsageType>>
type Strategy = Union<BoxedStrategy<IndexUsageType>>
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for IndexUsageType
impl Clone for IndexUsageType
source§fn clone(&self) -> IndexUsageType
fn clone(&self) -> IndexUsageType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for IndexUsageType
impl Debug for IndexUsageType
source§impl<'de> Deserialize<'de> for IndexUsageType
impl<'de> Deserialize<'de> for IndexUsageType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for IndexUsageType
impl Display for IndexUsageType
source§impl Hash for IndexUsageType
impl Hash for IndexUsageType
source§impl Ord for IndexUsageType
impl Ord for IndexUsageType
source§fn cmp(&self, other: &IndexUsageType) -> Ordering
fn cmp(&self, other: &IndexUsageType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for IndexUsageType
impl PartialEq for IndexUsageType
source§impl PartialOrd for IndexUsageType
impl PartialOrd for IndexUsageType
source§impl Serialize for IndexUsageType
impl Serialize for IndexUsageType
impl Eq for IndexUsageType
impl StructuralPartialEq for IndexUsageType
Auto Trait Implementations§
impl Freeze for IndexUsageType
impl RefUnwindSafe for IndexUsageType
impl Send for IndexUsageType
impl Sync for IndexUsageType
impl Unpin for IndexUsageType
impl UnwindSafe for IndexUsageType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PreferredContainer for T
impl<T> PreferredContainer for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign
, for types that do not implement AddAssign
.