Skip to content

Index the request list for keyset paging #61

Description

@Fluory

Why

Follow-up of #48 (review of #58): the request list pages by (created_at desc, id desc) per company, but there is no matching index, so every page sorts all of the company's requests before LIMIT 51. Approved by the orchestrator on 2026-09-24.

Scope

  • Migration: index on app.requests (company_id, created_at desc, id desc).
  • Schema + snapshot via the generator; data-model.md.

Acceptance criteria

  • The planner uses the index for a page query of one company (checked with EXPLAIN in an integration test on a seeded table, or the catalogue proves the index exists with the right column order).
  • pnpm verify green.

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions