Add database indexes to Task and User models ⚡
Maintainers usually reply within 1 day
@Mario-Mohar is already working on this.
Since Oct 9, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, mongodb
- Domain
- databases
Research direction
Start with the schema definitions in server/models/Task.js and server/models/User.js, then check how the listed fields are queried and whether existing data could conflict with a unique email index. Run the relevant server tests or checks after making the change; done means the requested indexes are defined and those checks pass.
Written by the indexing model from the issue text.
Description
Add database indexes to Task and User models ⚡
File: server/models/Task.js + server/models/User.js
No indexes on frequently queried fields 💀
With 10000 tasks queries get very slow fr!!
Fix: add indexes to Task model:
// at bottom of taskSchema definition:
taskSchema.index({ status: 1 })
taskSchema.index({ assignee: 1 })
taskSchema.index({ priority: 1 })
taskSchema.index({ createdAt: -1 })
taskSchema.index({ title: 'text',
description: 'text' }) // full text search!
// in User model:
userSchema.index({ email: 1 }, { unique: true })
~6 lines across 2 files!
Makes DB queries 10x faster!! 🔥
No frontend changes needed 🎯
- Dominant language
- JavaScript
- Stars
- 39
- Forks
- 105
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anoopcodehack/DevBoard
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
anoopcodehack/DevBoard#609 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anoopcodehack/DevBoard#608 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anoopcodehack/DevBoard#607 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anoopcodehack/DevBoard#599 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 82/100
anoopcodehack/DevBoard#598 ·
Maintainers usually reply within 1 day
All issues in anoopcodehack/DevBoard
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
521xueweihan/HelloGitHub#3939 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
needs-website-changes
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
[Bug] critique requires the detector on native targets, but audit.native.md says it does not applyOpenneeds triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pbakaus/impeccable#1017 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day