Documentation ¶
Index ¶
- func CanOptimize(l *logrus.Entry, ctx *session.Context, node ast.Node) bool
- func WithCalculateCardinalityMaxRow(row int) optimizerOption
- func WithCompositeIndexMaxColumn(column int) optimizerOption
- func WithCreateIndexStatement(f func(tableName string, columns ...string) string) optimizerOption
- type OptimizeResult
- type Optimizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanOptimize ¶ added in v1.2202.0
CanOptimize do some pre check on node.
func WithCalculateCardinalityMaxRow ¶
func WithCalculateCardinalityMaxRow(row int) optimizerOption
func WithCompositeIndexMaxColumn ¶
func WithCompositeIndexMaxColumn(column int) optimizerOption
Types ¶
type OptimizeResult ¶
type Optimizer ¶
func NewOptimizer ¶
func (*Optimizer) Optimize ¶
func (o *Optimizer) Optimize(ctx context.Context, selectStmt *ast.SelectStmt) ([]*OptimizeResult, error)
Optimize give index advice for the select statement.
Click to show internal directories.
Click to hide internal directories.