mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 19:11:44 +00:00

# Which Problems Are Solved On Zitadel cloud we found changing the order of columns in the `eventstore.events2_current_sequence` index improved CPU usage for the `SELECT ... FOR UPDATE` query the pusher executes. # How the Problems Are Solved `eventstore.events2_current_sequence`-index got replaced # Additional Context closes https://github.com/zitadel/zitadel/issues/9082
4 lines
180 B
SQL
4 lines
180 B
SQL
CREATE INDEX CONCURRENTLY IF NOT EXISTS events2_current_sequence2
|
|
ON eventstore.events2 USING btree
|
|
(aggregate_id ASC, aggregate_type ASC, instance_id ASC, sequence DESC);
|