Skip to content

Investigate and Address Inefficient N+1 Queries to Postgres in Workers #646

@fernandol-nvidia

Description

@fernandol-nvidia

What new feature or improvement would you like to see?

In various places of our codebase, we have N+1 patterns when querying DB.

N+1 query pattern means that we have N tasks, and we make 1 DB query per task, resulting in N roundtrips, N transactions, N DB read/writes.

For better throughput and atomicity, we should strive for transactions.

This applies to both Python and Golang

Why is this needed?

Improve throughput and consistency.

Avoiding DOS during heavy load.

Code of Conduct

  • I agree to follow NVIDIA OSMO's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request

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