mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-08 14:42:46 +08:00
creating index on the correct collection this time
This commit is contained in:
parent
d5e21757c6
commit
e24e95e59c
1 changed files with 10 additions and 6 deletions
|
@ -85,12 +85,16 @@ class LeaderboardsDAO {
|
|||
let end3 = performance.now();
|
||||
|
||||
let start4 = performance.now();
|
||||
await mongoDB().collection("leaderboards").createIndex({
|
||||
uid: -1,
|
||||
});
|
||||
await mongoDB().collection("leaderboards").createIndex({
|
||||
rank: 1,
|
||||
});
|
||||
await mongoDB()
|
||||
.collection(`leaderboards.${language}.${mode}.${mode2}`)
|
||||
.createIndex({
|
||||
uid: -1,
|
||||
});
|
||||
await mongoDB()
|
||||
.collection(`leaderboards.${language}.${mode}.${mode2}`)
|
||||
.createIndex({
|
||||
rank: 1,
|
||||
});
|
||||
let end4 = performance.now();
|
||||
|
||||
let timeToRunAggregate = (end1 - start1) / 1000;
|
||||
|
|
Loading…
Add table
Reference in a new issue