mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:57:31 +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
(cherry picked from commit ecbf0db15b
)
This commit is contained in:
@@ -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).
|
||||
|
Reference in New Issue
Block a user