AletheiaFact / AletheiaFact/aletheia
Create Database Index for sourceChannel to Speed Up Aggregations
- Linguagem predominante
- TypeScript
- Estrelas
- 55
- Forks
- 20
- Merge médio
- 2d 6h
- PRs com merge (30d)
- 2
Descrição
### Background Information
Currently, the `sourceChannel` field in the `VerificationRequest` collection is used frequently in aggregations and queries, for example when generating dashboards. Without an index, these operations can be slow on large collections because MongoDB needs to scan all documents. Adding an index would improve query performance for these operations.
### How
Create a database index on the `sourceChannel` field.
For example, in MongoDB shell:
```js
db.VerificationRequest.createIndex({ sourceChannel: 1 });
This index will allow MongoDB to quickly locate and group documents by sourceChannel, improving read performance for queries and aggregations.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.