Skip to content

Commit

Permalink
fix: apply optimized filter only for postgres
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Salaün <[email protected]>
  • Loading branch information
altitude committed Feb 6, 2024
1 parent 1551d38 commit e41aded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/sqlstorage/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (s *Store) buildTransactionsQuery(flavor Flavor, p ledger.TransactionsQuery
if !endTime.IsZero() {
sb.Where(sb.L("timestamp", endTime.UTC()))

if p.PageSize == 1 {
if flavor == PostgreSQL {
// We nudge the query planner in the right direction,
// by reducing the search space according to the end time.
// We have to use a raw query as the sqlbuilder
Expand Down

0 comments on commit e41aded

Please sign in to comment.