mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix(eventstore): add index to reduce db workload (#2813)
This commit is contained in:
parent
75f3067d42
commit
5b1267ae93
15
migrations/cockroach/V1.102__event_idx.sql
Normal file
15
migrations/cockroach/V1.102__event_idx.sql
Normal 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
|
||||
);
|
Loading…
Reference in New Issue
Block a user