zitadel/internal/eventstore/repository/sql
Silvan 4dc86c2415
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 06:49:30 +00: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 06:49:30 +00:00
local_crdb_test.go fix(init): add setting to enable durable locks on crdb (#7982) 2024-05-27 09:03:34 +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 06:49:30 +00:00