Skip to content

Commit

Permalink
chore: make Prefer_ordering_index=on default value for optimizer_switch
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrinux committed Dec 28, 2022
1 parent 4fa7c86 commit 73bbd54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc/command-line-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ Makes the _old_ table include a timestamp value. The _old_ table is what the ori

### optimizer-switch

Default is "", this allow to override a `SET GLOBAL optimizer_switch=key=value` by one set on the session with `SET SESSION optimizer_switch=key=value`.
Default is "prefer_ordering_index=on", this allow to override a `SET GLOBAL optimizer_switch=key=value` by one set on the session with `SET SESSION optimizer_switch=key=value`.
You can find values on https://dev.mysql.com/doc/refman/8.0/en/switchable-optimizations.html.
Example: `--optimizer-switch="prefer_ordering_index=on"`.
Example: `--optimizer-switch="prefer_ordering_index=off"`.

### tungsten

Expand Down
2 changes: 1 addition & 1 deletion go/cmd/gh-ost/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func main() {
criticalLoad := flag.String("critical-load", "", "Comma delimited status-name=threshold, same format as --max-load. When status exceeds threshold, app panics and quits")
flag.Int64Var(&migrationContext.CriticalLoadIntervalMilliseconds, "critical-load-interval-millis", 0, "When 0, migration immediately bails out upon meeting critical-load. When non-zero, a second check is done after given interval, and migration only bails out if 2nd check still meets critical load")
flag.Int64Var(&migrationContext.CriticalLoadHibernateSeconds, "critical-load-hibernate-seconds", 0, "When non-zero, critical-load does not panic and bail out; instead, gh-ost goes into hibernation for the specified duration. It will not read/write anything from/to any server")
flag.StringVar(&migrationContext.OptimizerSwitch, "optimizer-switch", "", "Optimizer switch params, eg: prefer_ordering_index=on")
flag.StringVar(&migrationContext.OptimizerSwitch, "optimizer-switch", "prefer_ordering_index=on", "optimizer_switch param")
quiet := flag.Bool("quiet", false, "quiet")
verbose := flag.Bool("verbose", false, "verbose")
debug := flag.Bool("debug", false, "debug mode (very verbose)")
Expand Down

0 comments on commit 73bbd54

Please sign in to comment.