Skip to content

Count and Sort extremely slow #56

@aarongainz

Description

@aarongainz

We're having an issue where the Count and Sort operations drag the aggregate hundreds of times longer than just returning the documents.

We can get the documents for a page back in 200ms or less using a rigged countQuery, but once we drop our .limit() on the countQuery our execution times jump to 60seconds, then if we add a sort, on an indexed field (both in our Search Index and indexed separately) it can take 120+seconds.

Every field we're querying on is indexed. Obiously it's scanning the entire collection in these cases but I can't crack this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions