tidb: github.com/pingcap/tidb/planner/util Index | Files

package util

import "github.com/pingcap/tidb/planner/util"

Index

Package Files

path.go

type AccessPath Uses

type AccessPath struct {
    Index          *model.IndexInfo
    FullIdxCols    []*expression.Column
    FullIdxColLens []int
    IdxCols        []*expression.Column
    IdxColLens     []int
    Ranges         []*ranger.Range
    // CountAfterAccess is the row count after we apply range seek and before we use other filter to filter data.
    CountAfterAccess float64
    // CountAfterIndex is the row count after we apply filters on index and before we apply the table filters.
    CountAfterIndex float64
    AccessConds     []expression.Expression
    EqCondCount     int
    EqOrInCondCount int
    IndexFilters    []expression.Expression
    TableFilters    []expression.Expression
    // PartialIndexPaths store all index access paths.
    // If there are extra filters, store them in TableFilters.
    PartialIndexPaths []*AccessPath

    StoreType kv.StoreType

    IsDNFCond bool

    // IsTablePath indicates whether this path is table path.
    IsTablePath bool
    // Forced means this path is generated by `use/force index()`.
    Forced bool
}

AccessPath indicates the way we access a table: by using single index, or by using multiple indexes, or just by using table scan.

func (*AccessPath) SplitCorColAccessCondFromFilters Uses

func (path *AccessPath) SplitCorColAccessCondFromFilters(eqOrInCount int) (access, remained []expression.Expression)

SplitCorColAccessCondFromFilters move the necessary filter in the form of index_col = corrlated_col to access conditions.

Package util imports 6 packages (graph) and is imported by 4 packages. Updated 2020-01-27. Refresh now. Tools for package owners.