Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination to /matches #96

Closed
KtorZ opened this issue Dec 31, 2022 Discussed in #75 · 0 comments · Fixed by #100
Closed

Add pagination to /matches #96

KtorZ opened this issue Dec 31, 2022 Discussed in #75 · 0 comments · Fixed by #100
Assignees
Milestone

Comments

@KtorZ
Copy link
Member

KtorZ commented Dec 31, 2022

Discussed in #75

Originally posted by cortsf October 17, 2022

Describe your idea, in simple words.

Add limit or proper pagination parameters to the /matches endpoint.

Why is it a good idea?

It would allow us to index an oracle. We only need the most recent values.

Are you willing to work on it yourself?

Probably. We are looking to pick a chain indexer for our project without having to extend it if possible.

@KtorZ KtorZ self-assigned this Dec 31, 2022
@KtorZ KtorZ added this to the v2.2.0 milestone Dec 31, 2022
KtorZ added a commit that referenced this issue Jan 3, 2023
  The goal is to allow client fetching smaller response, but not
  necessarily to use the range to make query faster.

  We gain some performance improvement from the fact that the database
  will yield less results, but the queries are extended in a way that
  the slot range has no effect whatsoever on the query planner.

  This is because, we generally want to keep searching by address,
  payment credential, output reference and so on, and not drop those
  indexes for a dumb query on the created_at index. Indeed, imagine we
  query a specific output reference from the database, but only after
  slot 5M; now there might still be millions of results after that slot,
  so we don't want the database to only filter results by slot and then,
  scan what's left to find the output. We'd rather find the candidate
  outputs, and then, discard those that aren't within the given slot
  range.

  Fixes #96
@KtorZ KtorZ closed this as completed in #100 Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant