mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 11:37:32 +00:00
fix(eventstore): add index to reduce db workload (#2813)
This commit is contained in:
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
|
||||||
|
);
|
Reference in New Issue
Block a user