new tournament database index for createdBy+startsAt+status
for #9850 else the API endpoint could be scanning thousands of recordspull/9850/head
parent
31ba5d3a08
commit
07e2b28a6c
|
@ -0,0 +1,6 @@
|
|||
db.tournament2.update({ createdBy: 'lichess' }, { $unset: { createdBy: 1 } }, { multi: 1 });
|
||||
db.tournament2.dropIndex('createdBy_1_startsAt_-1');
|
||||
db.tournament2.createIndex(
|
||||
{ createdBy: 1, startsAt: -1, status: 1 },
|
||||
{ partialFilterExpression: { createdBy: { $exists: true } } }
|
||||
);
|
Loading…
Reference in New Issue