Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count and Sort extremely slow #56

Open
aarongainz opened this issue Mar 5, 2024 · 1 comment
Open

Count and Sort extremely slow #56

aarongainz opened this issue Mar 5, 2024 · 1 comment

Comments

@aarongainz
Copy link

aarongainz commented Mar 5, 2024

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

@trycoon
Copy link

trycoon commented Jul 22, 2024

@aarongainz Try the latest version, maybe this fixes your performance issues? #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants