Documentation
¶
Index ¶
- Variables
- func IsSubOptimal(defPlan *Bench, plan *Bench) bool
- func Plan(node ast.StmtNode, hints *[]*ast.TableOptimizerHint, planId int64) (string, error)
- type Bench
- type BenchCollection
- type Benches
- type Cardinalitor
- type CardinalityQueryType
- type Horoscope
- type Metrics
- type QueryType
- type Row
- type ServerError
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PlanHint = model.NewCIStr("NTH_PLAN")
)
Functions ¶
func IsSubOptimal ¶
Types ¶
type BenchCollection ¶
type BenchCollection []*Benches
func (*BenchCollection) Output ¶
func (c *BenchCollection) Output(format string) error
func (*BenchCollection) Table ¶
func (c *BenchCollection) Table() Table
type Cardinalitor ¶
type Cardinalitor struct { Type CardinalityQueryType TableColumns map[string][]string Timeout time.Duration // contains filtered or unexported fields }
func NewCardinalitor ¶
func NewCardinalitor(exec executor.Executor, tableColumns map[string][]string, typ CardinalityQueryType, timeout time.Duration) *Cardinalitor
type CardinalityQueryType ¶
type CardinalityQueryType string
const ( TypeEMQ CardinalityQueryType = "emq" TypeRGE CardinalityQueryType = "rge" TypeDCT CardinalityQueryType = "dct" )
type Horoscope ¶
type Horoscope struct {
// contains filtered or unexported fields
}
func NewHoroscope ¶
func (*Horoscope) CollectCardinalityEstimationError ¶
func (h *Horoscope) CollectCardinalityEstimationError(query string) (baseTable []*executor.CardinalityInfo, join []*executor.CardinalityInfo, err error)
type Metrics ¶
func RunSQLWithTime ¶ added in v1.0.0
type Row ¶
type Row struct { QueryId string `json:"queryID"` Query string `json:"query"` PlanSpaceCount int `json:"planSpaceSize"` DefaultPlanId int `json:"defaultPlanID"` DefaultPlanDur float64 `json:"defaultPlanDur"` DefaultPlanDurDev float64 `json:"defaultPlanDurDev"` BestPlanDur float64 `json:"bestPlanDur"` BestPlanDurDev float64 `json:"bestPlanDurDev"` OptimalPlan []string `json:"optimalPlan"` Effectiveness float64 `json:"effectiveness"` EstRowsQError map[string]float64 `json:"-"` }
type ServerError ¶ added in v1.0.0
type ServerError struct {
// contains filtered or unexported fields
}
ServerError wraps server error
Click to show internal directories.
Click to hide internal directories.