Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • lava lava
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 64
    • Merge requests 64
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavalava
  • Merge requests
  • !2018

Open
Created Mar 07, 2023 by Igor Ponomarev@igo95862Contributor
  • Report abuse
Report abuse

Draft: Create a partial TestCase index to help Job Errors page performance

  • Overview 2
  • Commits 1
  • Changes 2

This index contains only TestCases that passed the metadata string comparison test. This eliminates the need to scan metadata every time the page is loaded.

However, this means that the index has to be updated every time the Job Errors query is changed.

In the commit 927b09f4 the string matching was changed from regex to LIKE. However, it looks like Django fails to emit proper SQL when creating the partial index with LIKE method. (it emits double %% percent signs) Reverting to regex might cause a slightly worse performance but having and index completely compesates that.

Also change the Job Errors page sorting. The previous suite__job__id DESC sorting had to load all the entries to memory before sorting because it was sorted on key in a different table. New sorting uses the TestCase primary key in d

This MR combined with !2015 (merged) improves the time to load job errors page from 90 to 0.018 seconds. (x5000 performance)

However, this MR creates a migration and I would like the !2000 and !1953 to be merged first to have a consistent migration order.

Edited Mar 09, 2023 by Igor Ponomarev
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: job-errors-partial-index