Skip to content

Improve foreign key index ordering #67

Description

@danpalmer

We have a foreign key constraint that references (label, state_machine). This has a corresponding btree index, where the ordering of the components of the contraint matter.

This means that queries, which typically filter on state machines, are often taking much longer than they need to because they can't use the index to filter history entries.

We should reverse the order of the components in the foreign key constraint.

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