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
  • !2000

Open
Created Feb 23, 2023 by Igor Ponomarev@igo95862Contributor
  • Report abuse
Report abuse

Draft: TestJob: Add time indexes from most recent to oldest (+56% performance)

  • Overview 0
  • Commits 3
  • Changes 6

By default Django would create an ascending index.

For time field this would mean from the oldest time to most recent time.

However, most of the time LAVA would sort the jobs from most recent jobs to the oldests jobs. Having incorrect direction index hurts the performance.

This commit makes submit time index descending and also adds the start_time and end_time descending indexes which helps the pages like /scheduler/reports.

Benchmarks of scheduler/alljobs: (look at the IndexBackwardsScan before vs IndexScan after)

Before - 140.476 ms https://explain.depesz.com/s/81wD#html

After - 89.716 ms https://explain.depesz.com/s/lvCF#html

A 56% improvement.

This MR relies on !1950 and conflicts with !1953. (once one is merged the other needs a rebase)

Edited Mar 09, 2023 by Igor Ponomarev
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: lava-scheduler-app-time-indexes-desc