Skip to content

Commit

Permalink
services/horizon: Optimize claimable balances query to limit records …
Browse files Browse the repository at this point in the history
…earlier (#4385)
  • Loading branch information
Shaptic authored May 19, 2022
1 parent a384ff6 commit 156db13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions services/horizon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this
file. This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

- Querying claimable balances has been optimized ([4385](https://github.com/stellar/go/pull/4385)).

## V2.17.0

This is the final release after the [release candidate](v2.17.0-release-candidate), including some small additional changes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (q *Q) GetClaimableBalances(ctx context.Context, query ClaimableBalancesQue
sql = sql.
Prefix("WITH cb AS (").
Suffix(
") select "+claimableBalancesSelectStatement+" from cb LIMIT ?",
"LIMIT ?) select "+claimableBalancesSelectStatement+" from cb",
query.PageQuery.Limit,
)

Expand Down

0 comments on commit 156db13

Please sign in to comment.