mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 10:13:16 +00:00
# Which Problems Are Solved
#9837 added a new index `es_instance_position` on the events table with
the idea to improve performance for some projections. Unfortunately, it
makes it worse for almost all projections and would only improve the
situation for the events handler of the actions V2 subscriptions.
# How the Problems Are Solved
Remove the index again.
# Additional Changes
None
# Additional Context
relates to #9837
relates to #9863
(cherry picked from commit d71795c433)
28 lines
536 B
Go
28 lines
536 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"
|
|
}
|