Skip to content

Commit

Permalink
Add index on run details on experiment UUID & conditions & finished t…
Browse files Browse the repository at this point in the history
…ime (kubeflow#3610)
  • Loading branch information
frozeNinK authored and Jeffwan committed Dec 9, 2020
1 parent 3d2a6fd commit 69a905c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/src/apiserver/client_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ func initDBClient(initConnectionTimeout time.Duration) *storage.DB {
glog.Fatalf("Failed to create index experimentuuid_createatinsec on run_details. Error: %s", response.Error)
}

response = db.Model(&model.RunDetail{}).AddIndex("experimentuuid_conditions_finishedatinsec", "ExperimentUUID", "Conditions", "FinishedAtInSec")
if response.Error != nil {
glog.Fatalf("Failed to create index experimentuuid_conditions_finishedatinsec on run_details. Error: %s", response.Error)
}

response = db.Model(&model.RunMetric{}).
AddForeignKey("RunUUID", "run_details(UUID)", "CASCADE" /* onDelete */, "CASCADE" /* update */)
if response.Error != nil {
Expand Down

0 comments on commit 69a905c

Please sign in to comment.