Skip to content

Commit

Permalink
Merge pull request #246 from sapcc/index
Browse files Browse the repository at this point in the history
Optimize worst db query
  • Loading branch information
majewsky committed May 15, 2024
2 parents 5b7d3d1 + ce24458 commit 292cdbd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/db/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,10 @@ var SQLMigrations = map[string]string{
usage TEXT NOT NULL
);
`,
"022_add_index_to_assets_next_scrape_at.up.sql": `
CREATE INDEX ON assets (next_scrape_at);
`,
"022_add_index_to_assets_next_scrape_at.down.sql": `
DROP INDEX assets_next_scrape_at_idx;
`,
}

0 comments on commit 292cdbd

Please sign in to comment.