Add new index for action to resolve the performance problem (#32333)

Fix #32224
This commit is contained in:
Lunny Xiao authored and GitHub committed 2024-11-06 22:04:48 +00:00
1 parent 7adc4717ec
commit 913be9e8ac
3 files changed
+57 -1

No files matched your search

+4 -1
View File
@@ -171,7 +171,10 @@ func (a *Action) TableIndices() []*schemas.Index {
cudIndex := schemas.NewIndex("c_u_d", schemas.IndexType)
cudIndex.AddColumn("created_unix", "user_id", "is_deleted")
indices := []*schemas.Index{actUserIndex, repoIndex, cudIndex}
cuIndex := schemas.NewIndex("c_u", schemas.IndexType)
cuIndex.AddColumn("user_id", "is_deleted")
indices := []*schemas.Index{actUserIndex, repoIndex, cudIndex, cuIndex}
return indices
}