Skip to content

perf(backend): add escrow query performance indexes - #501

Open
pchieneye wants to merge 1 commit into
StayLitCodes:mainfrom
pchieneye:perf/backend-escrow-indexes-clean
Open

perf(backend): add escrow query performance indexes#501
pchieneye wants to merge 1 commit into
StayLitCodes:mainfrom
pchieneye:perf/backend-escrow-indexes-clean

Conversation

@pchieneye

Copy link
Copy Markdown

perf(backend): add database indexing for escrow query performance

This PR adds database indexes for the most common escrow lookup patterns to improve query performance as the dataset grows.

What changed

  • Added an index on escrow status for status-based filtering
  • Added a composite index on creator and status for the common filtered lookup pattern
  • Added indexes on escrow creation and expiry timestamps for date-range and expiry queries
  • Added a wallet-address index for wallet-based party/user lookups
  • Added an index on escrow event escrow IDs for event retrieval queries
  • Added a migration file covering all requested indexes
  • Added a regression test to validate the migration creates the expected indexes

Testing

  • Verified the migration includes all requested index creation statements
  • Added a regression test for the new migration

Closes: #486

@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@pchieneye Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@KuchiMercy

Copy link
Copy Markdown
Contributor

@pchieneye, kindly resolve the error. Thanks

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 this pull request may close these issues.

perf(backend): Add database indexing for escrow query performance

2 participants