Skip to content

Use mongo index for usernames in group model #42

Description

@brandonLi8

We currently query the usernames to check for uniqueness, and the concern is that this is costly. Using mongo index for usernames in group model would make this really fast, and it looks super simple to set up.

See https://docs.mongodb.com/manual/indexes. For groups, we can use https://docs.mongodb.com/manual/core/index-multikey/ for indexes on arrays. Use the unique option: https://docs.mongodb.com/drivers/node/fundamentals/indexes/#unique-indexes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions