perf: drop instance position index (#10626)

# Which Problems Are Solved

There was an left-behind index introduced to optimize the old and
removed event execution handler. The index confuses prostgres and it
sometimes picks this index in favor of the projection specific index.
This sometimes leads to bad query performance in the projectio handlers.

# How the Problems Are Solved

Drop the index

# Additional Changes

- none

# Additional Context

- Forgotten in https://github.com/zitadel/zitadel/pull/10564

(cherry picked from commit 54554b8fb9)
This commit is contained in:
Tim Möhlmann
2025-09-10 12:26:22 +03:00
committed by Livio Spring
parent 069861f3f7
commit 78ded99017
2 changed files with 2 additions and 2 deletions

View File

@@ -23,5 +23,5 @@ func (mig *InstancePositionIndex) Execute(ctx context.Context, _ eventstore.Even
}
func (mig *InstancePositionIndex) String() string {
return "54_instance_position_index_again"
return "54_instance_position_index_remove_again"
}

View File

@@ -1 +1 @@
CREATE INDEX CONCURRENTLY IF NOT EXISTS es_instance_position ON eventstore.events2 (instance_id, position);
DROP INDEX IF EXISTS eventstore.es_instance_position;