package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
BindHint will add hints for stmt according to the hints in `hintsSet`.
CheckBindingFromHistoryComplete checks whether the ast and hint string from history is complete.
CollectHint collects hints for a statement.
CollectUnmatchedHintWarnings collects warnings for unmatched hints from this TableHintInfo.
ExtractTableHintsFromStmtNode extracts table hints from this node.
ExtractUnmatchedTables extracts unmatched tables from hintTables.
GenerateQBName builds QBName from offset.
NewQBHintHandler creates a QBHintHandler.
ParseHintsSet parses a SQL string, then collects and normalizes the HintsSet.
ParsePlanHints parses *ast.TableOptimizerHint to PlanHints.
ParseStmtHints parses statement hints.
RemoveDuplicatedHints removes duplicated hints in this hit list.
Restore2IndexHint restores index hint to string.
Restore2JoinHint restores join hint to string.
Restore2StorageHint restores storage hint to string.
RestoreIndexHint returns string format of IndexHint.
RestoreOptimizerHints restores these hints.
RestoreTableOptimizerHint returns string format of TableOptimizerHint.
# Constants
HintAggToCop is hint enforce pushing aggregation to coprocessor.
HintBCJ indicates applying broadcast join by force.
HintFlagNoDecorrelate corresponds to HintNoDecorrelate.
HintFlagSemiJoinRewrite corresponds to HintSemiJoinRewrite.
HintForceIndex make optimizer to use this index even if it thinks a table scan is more efficient.
HintHashAgg is hint enforce hash aggregation.
HintHashJoinBuild is hint enforce hash join's build side.
HintHashJoinProbe is hint enforce hash join's probe side.
HintHJ is hint enforce hash join.
HintIgnoreIndex is hint enforce ignoring some indexes.
HintIgnorePlanCache is a hint to enforce ignoring plan cache.
HintIndexMerge is a hint to enforce using some indexes at the same time.
HintINLHJ is hint enforce index nested loop hash join.
HintINLJ is hint enforce index nested loop join.
Deprecated: HintINLMJ is hint enforce index nested loop merge join.
HintLeading specifies the set of tables to be used as the prefix in the execution plan.
HintLimitToCop is a hint enforce pushing limit or topn to coprocessor.
HintMaxExecutionTime specifies the max allowed execution time in milliseconds.
HintMemoryQuota sets the memory limit for a query.
HintMerge is a hint which can switch turning inline for the CTE.
HintMPP1PhaseAgg enforces the optimizer to use the mpp-1phase aggregation.
HintMPP2PhaseAgg enforces the optimizer to use the mpp-2phase aggregation.
HintNoDecorrelate indicates a LogicalApply not to be decorrelated.
HintNoHashJoin is the hint to enforce the query not to use hash join.
HintNoIndexHashJoin is the hint to enforce the query not to use index hash join.
HintNoIndexJoin is the hint to enforce the query not to use index join.
HintNoIndexMerge is a hint to disable index merge.
HintNoIndexMergeJoin is the hint to enforce the query not to use index merge join.
HintNoMergeJoin is the hint to enforce the query not to use merge join.
HintNoOrderIndex is hint enforce using some indexes and not keep the index's order.
HintOrderIndex is hint enforce using some indexes and keep the index's order.
HintReadFromStorage is hint enforce some tables read from specific type of storage.
HintSemiJoinRewrite is a hint to force we rewrite the semi join operator as much as possible.
HintShuffleJoin indicates applying shuffle join by force.
HintSMJ is hint enforce merge join.
HintStraightJoin causes TiDB to join tables in the order in which they appear in the FROM clause.
HintStreamAgg is hint enforce stream aggregation.
HintTiFlash is a label represents the tiflash storage type.
HintTiKV is a label represents the tikv storage type.
HintTimeRange is a hint to specify the time range for metrics summary tables.
HintUseIndex is hint enforce using some indexes.
HintUseToja is a hint to optimize `in (select ...)` subquery into `join`.
PreferBCJoin indicates that the optimizer prefers to use broadcast join.
PreferHashAgg indicates that the optimizer prefers to use hash aggregation.
PreferHashJoin indicates that the optimizer prefers to use hash join.
PreferHJBuild indicates that the optimizer prefers to use hash join.
PreferHJProbe indicates that the optimizer prefers to use hash join.
PreferINLHJ indicates that the optimizer prefers to use index nested loop hash join.
PreferINLJ indicates that the optimizer prefers to use index nested loop join.
PreferINLMJ indicates that the optimizer prefers to use index nested loop merge join.
PreferLeftAsHJBuild indicates that the optimizer prefers to use left child as build child of hash join.
PreferLeftAsHJProbe indicates that the optimizer prefers to use left child as probe child of hash join.
PreferLeftAsINLHJInner indicates that the optimizer prefers to use left child as inner child of index nested loop hash join.
PreferLeftAsINLJInner indicates that the optimizer prefers to use left child as inner child of index nested loop join.
PreferLeftAsINLMJInner indicates that the optimizer prefers to use left child as inner child of index nested loop merge join.
PreferMergeJoin indicates that the optimizer prefers to use merge join.
PreferMPP1PhaseAgg indicates that the optimizer prefers to use 1-phase aggregation.
PreferMPP2PhaseAgg indicates that the optimizer prefers to use 2-phase aggregation.
PreferNoHashJoin indicates that the optimizer prefers not to use hash join.
PreferNoIndexHashJoin indicates that the optimizer prefers not to use index hash join.
PreferNoIndexJoin indicates that the optimizer prefers not to use index join.
PreferNoIndexMergeJoin indicates that the optimizer prefers not to use index merge join.
PreferNoMergeJoin indicates that the optimizer prefers not to use merge join.
PreferRewriteSemiJoin indicates that the optimizer prefers to rewrite semi join.
PreferRightAsHJBuild indicates that the optimizer prefers to use right child as build child of hash join.
PreferRightAsHJProbe indicates that the optimizer prefers to use right child as probe child of hash join.
PreferRightAsINLHJInner indicates that the optimizer prefers to use right child as inner child of index nested loop hash join.
PreferRightAsINLJInner indicates that the optimizer prefers to use right child as inner child of index nested loop join.
PreferRightAsINLMJInner indicates that the optimizer prefers to use right child as inner child of index nested loop merge join.
PreferShuffleJoin indicates that the optimizer prefers to use shuffle join.
PreferStreamAgg indicates that the optimizer prefers to use stream aggregation.
PreferTiFlash indicates that the optimizer prefers to use TiFlash layer.
PreferTiKV indicates that the optimizer prefers to use TiKV layer.
TiDBBroadCastJoin indicates applying broadcast join by force.
TiDBHashJoin is hint enforce hash join.
TiDBIndexNestedLoopJoin is hint enforce index nested loop join.
TiDBMergeJoin is hint enforce merge join.
TypeDelete for DELETE.
TypeInvalid for unexpected statements.
TypeSelect for SELECT.
TypeUpdate for Update.
# Variables
ErrWarnConflictingHint is a warning error.
# Structs
HintedIndex indicates which index this hint should take effect on.
HintedTable indicates which table this hint should take effect on.
HintsSet contains all hints of a query.
IndexJoinHints stores hint information about index nested loop join.
PlanHints are hints that are used to control the optimizer plan choices like 'use_index', 'hash_join'.
QBHintHandler is used to handle hints at different query blocks.
StmtHints are hints that apply to the entire statement, like 'max_exec_time', 'memory_quota'.
# Type aliases
NodeType indicates if the node is for SELECT / UPDATE / DELETE.