Skip to content

Commit

Permalink
perf(core): add missing index for paginated query (#4651)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi authored Nov 8, 2024
1 parent e3e9285 commit 1e83e38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/api/src/services/ledger/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ transactionSchema.index({ payout_id: 1 })
transactionSchema.index({ _original_journal: 1 })
transactionSchema.index({ related_journal: 1 })
transactionSchema.index({ external_id: 1 })
transactionSchema.index({
"book": 1,
"account_path.0": 1,
"account_path.1": 1,
"_id": -1,
})

// indexes used by balance queries
transactionSchema.index({ book: 1, accounts: 1, currency: 1, _id: 1 })
Expand Down

0 comments on commit 1e83e38

Please sign in to comment.