Skip to content

N+1 query pattern when loading related records #29

Description

@boluwacodes

Listing parent records with their related child records currently issues one query per parent instead of a single joined or batched query, which shows up clearly under load testing with larger datasets.

Fix: Use eager loading / a batched query for the relation instead of per-row lookups.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions