mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-17 02:31:29 +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 ecbf0db15b6bd09587bdaebc2874ec7c207864ea)
This commit is contained in:
parent
7143a359b1
commit
c5b6323ca6
@ -18,6 +18,7 @@ type StepStates struct {
|
|||||||
// Query implements eventstore.QueryReducer.
|
// Query implements eventstore.QueryReducer.
|
||||||
func (*StepStates) Query() *eventstore.SearchQueryBuilder {
|
func (*StepStates) Query() *eventstore.SearchQueryBuilder {
|
||||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
||||||
|
InstanceID(""). // to make sure we can use an appropriate index
|
||||||
AddQuery().
|
AddQuery().
|
||||||
AggregateTypes(SystemAggregate).
|
AggregateTypes(SystemAggregate).
|
||||||
AggregateIDs(SystemAggregateID).
|
AggregateIDs(SystemAggregateID).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user