Skip to content

Index counts for feature-to-run lookups #31

Description

@claymcleod

The feature-runs endpoint filters counts by feature_id, but the available composite index starts with run_id.

The query finds all runs containing a given feature, while the schema only indexes counts(run_id, feature_id). PostgreSQL cannot efficiently use that index for a lookup constrained only by feature_id.

Add an index on (feature_id, run_id) and compare EXPLAIN ANALYZE before and after on a representative counts table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions