fix(eventstore): add index to reduce db workload (#2813)

This commit is contained in:
Silvan 2021-12-08 17:18:54 +01:00 committed by GitHub
parent 75f3067d42
commit 5b1267ae93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,15 @@
CREATE INDEX agg_type_seq ON eventstore.events
(aggregate_type, event_sequence DESC)
STORING (
id
, event_type
, aggregate_id
, aggregate_version
, previous_aggregate_sequence
, creation_date
, event_data
, editor_user
, editor_service
, resource_owner
, previous_aggregate_type_sequence
);