mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 15:35:10 +00:00
fix(setup): improve search query to use index (#8898)
# Which Problems Are Solved The setup filter for previous steps and kept getting slower. This is due to the filter, which did not provide any instanceID and thus resulting in a full table scan. # How the Problems Are Solved - Added an empty instanceID filter (since it's on system level) # Additional Changes None # Additional Context Noticed internally and during migrations on some regions
This commit is contained in:
parent
a09c772b03
commit
ecbf0db15b
@ -18,6 +18,7 @@ type StepStates struct {
|
||||
// Query implements eventstore.QueryReducer.
|
||||
func (*StepStates) Query() *eventstore.SearchQueryBuilder {
|
||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
||||
InstanceID(""). // to make sure we can use an appropriate index
|
||||
AddQuery().
|
||||
AggregateTypes(SystemAggregate).
|
||||
AggregateIDs(SystemAggregateID).
|
||||
|
Loading…
Reference in New Issue
Block a user