mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-23 03:06:46 +00:00
# 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)
28 lines
542 B
Go
28 lines
542 B
Go
package setup
|
|
|
|
import (
|
|
"context"
|
|
_ "embed"
|
|
|
|
"github.com/zitadel/zitadel/internal/database"
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
)
|
|
|
|
var (
|
|
//go:embed 54.sql
|
|
instancePositionIndex string
|
|
)
|
|
|
|
type InstancePositionIndex struct {
|
|
dbClient *database.DB
|
|
}
|
|
|
|
func (mig *InstancePositionIndex) Execute(ctx context.Context, _ eventstore.Event) error {
|
|
_, err := mig.dbClient.ExecContext(ctx, instancePositionIndex)
|
|
return err
|
|
}
|
|
|
|
func (mig *InstancePositionIndex) String() string {
|
|
return "54_instance_position_index_remove_again"
|
|
}
|