Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up GET_VULNS #1354

Merged
merged 6 commits into from
Nov 17, 2020
Merged

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented Nov 17, 2020

What:

Speed up GET_VULNS:

  1. Remove extra time columns that were just doing ISO conversion from the iterator
  2. Use EXISTS instead of "count" in the WHERE clause.
  3. Also use EXISTS in the counts.

Why:

GET_VULNS is slow with many results.

With my 1.2 million result db:

After 1 the gvmd vuln query went from 25s to 20s.
After 2 the query went down to 6s.

After 1 and 2 the request in GSA that gets the vulns went down from about 60k ms to 21k ms.
After 3 the GSA request went down to 11k ms.

How did you test it:

Open GSA Vulnerabilities page. Check times in network tab and in gvmd logs.

Checklist:

@mattmundell mattmundell changed the title Use epoch columns for GET_VULNS oldest and newest Speed up GET_VULNS Nov 17, 2020
@mattmundell mattmundell marked this pull request as ready for review November 17, 2020 13:10
@mattmundell mattmundell marked this pull request as draft November 17, 2020 13:19
@mattmundell mattmundell marked this pull request as ready for review November 17, 2020 14:10
@timopollmeier timopollmeier merged commit d958f71 into greenbone:master Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants