zitadel/internal/eventstore/repository/sql
Silvan 43404d960c fix(eventstore): order by sequence if filter by aggregate id (#8019)
# Which Problems Are Solved

Queriying events by an aggregate id can produce high loads on the
database if the aggregate id contains many events (count > 1000000).

# How the Problems Are Solved

Instead of using the postion and in_tx_order columns we use the sequence
column which guarantees correct ordering in a single aggregate and uses
more optimised indexes.

# Additional Context

Closes https://github.com/zitadel/DevOps/issues/50

Co-authored-by: Livio Spring <livio.a@gmail.com>
2024-05-28 08:50:42 +02:00
..
crdb_test.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
crdb.go fix(eventstore): order by sequence if filter by aggregate id (#8019) 2024-05-28 08:50:42 +02:00
local_crdb_test.go chore(core): update dependencies (#7517) 2024-03-11 10:43:56 +00:00
query_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
query.go fix(eventstore): order by sequence if filter by aggregate id (#8019) 2024-05-28 08:50:42 +02:00