AletheiaFact / AletheiaFact/aletheia

Create Database Index for sourceChannel to Speed Up Aggregations

Aberta
#2,139 0 comentários 0 reações 0 responsáveis Ver no GitHub
tech
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.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.