Benchmark Current DB Calls
Why are we doing this work
We need to benchmark our vulnerability database calls so we can determine which of our calls are causing the biggest performance hit. These can be done using the #database-lab channel in Slack. The SQL queries used to test can be retrieved from a rails console with the command
Vulnerability.<scope>.to_sql
Relevant links
Investigation plan
-
backend Run the scopes in ee/app/models/ee/vulnerability.rb
through the DB analyzer in #database-lab- Test against projects with different counts of vulnerabilities
- For each query that the analyzer has suggestions, create an issue in this epic.
-
:with_author_and_project
-
:with_findings
-
:with_findings_and_scanner
-
:with_findings_scanner_and_identifiers
-
:with_created_issue_links_and_issues
-
:visible_to_user_and_access_level
-
:for_projects
-
:with_report_types
-
:with_severities
-
:with_states
-
:with_scanner_external_ids
-
:grouped_by_severity
-
:by_project_fingerprints
-
:by_scanner_ids
-
:with_resolution
-
:with_issues