Skip to content

bug: GetWorkspaceAppStatusesByAppIDs and GetLatestWorkspaceAppStatusByAppID use sequential scans #1175

@spikecurtis

Description

@spikecurtis

During a scale test of task status updates, the database goes to 100% CPU and things break

Image

The two queries in the title are the most expensive:

Image

They cause sequential scans because we don't have an index on (app_id, created_at).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions