Skip to content

Commit

Permalink
re-tune indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
ldelossa committed May 20, 2020
1 parent 92a7a15 commit 8fd261d
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions libvuln/migrations/migration1.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,7 @@ const (
version_kind TEXT,
UNIQUE (hash_kind, hash)
);
-- These are some guesses at useful indexes. These should be measured.
CREATE INDEX IF NOT EXISTS vuln_package_idx on vuln (
package_name,
package_kind,
package_version,
package_module
);
CREATE INDEX IF NOT EXISTS vuln_dist_idx on vuln (
dist_id,
dist_name,
dist_version,
dist_version_code_name,
dist_version_id,
dist_arch,
dist_cpe,
dist_pretty_name
);
CREATE INDEX IF NOT EXISTS vuln_repo_idx on vuln (
repo_name,
repo_key,
repo_uri
);
CREATE INDEX vuln_lookup_idx on vuln(package_name, dist_version_code_name, dist_pretty_name, dist_name, dist_version_id, dist_version, dist_arch, dist_cpe);
-- Uo_vuln is the association table that does the many-many association
-- between update operations and vulnerabilities.
--
Expand Down

0 comments on commit 8fd261d

Please sign in to comment.