mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-20 06:37:23 +02:00
perf: cut MongoDB scans in repository workflows (#780)
* Add repository name index * Optimize repository file counts * Optimize MongoDB query workloads
This commit is contained in:
1 parent
a30457993d
commit
7aa9557905
12 files changed
+124
-61
No files matched your search
@@ -77,4 +77,15 @@ const AnonymizedRepositorySchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
AnonymizedRepositorySchema.index({ "source.repositoryName": 1 });
|
||||
AnonymizedRepositorySchema.index({ status: 1, statusDate: 1 });
|
||||
AnonymizedRepositorySchema.index({ lastView: 1 });
|
||||
AnonymizedRepositorySchema.index({ anonymizeDate: 1 });
|
||||
AnonymizedRepositorySchema.index({ status: 1, isReseted: 1, lastView: 1 });
|
||||
AnonymizedRepositorySchema.index({
|
||||
status: 1,
|
||||
isReseted: 1,
|
||||
"options.expirationDate": 1,
|
||||
});
|
||||
|
||||
export default AnonymizedRepositorySchema;
|
||||
Reference in new issue
Block a user