Skip to content

Commit

Permalink
Add index to improve query performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed Dec 19, 2023
1 parent db9e952 commit dcb8cbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/archivist/recorder/repositories/mongo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default class MongoRepository extends RepositoryInterface {

this.collection = db.collection(this.collectionName);

await this.collection.createIndex({ serviceId: 1, termsType: 1, fetchDate: -1 });

return this;
}

Expand Down

0 comments on commit dcb8cbb

Please sign in to comment.