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

Replace sorting by $createdAt with natural order #493

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

stnguyen90
Copy link
Contributor

What does this PR do?

By sorting on Query.orderDesc(''), results are still ordered by newest results first, but the performance is much better than sorting by $createdAt.

Test Plan

Manual

Related PRs and Issues

Previous PR where we removed Query.orderDesc('$createdAt') due to performance:

Have you read the Contributing Guidelines on issues?

Yes

@vercel
Copy link

vercel bot commented Aug 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
console ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 10:55pm
console-cloud ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 10:55pm
console-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 10:55pm

By sorting on Query.orderDesc(''), results are still ordered by
newest results first, but the performance is much better than
sorting by $createdAt.
@christyjacob4 christyjacob4 merged commit ae9e67f into main Aug 9, 2023
2 checks passed
@stnguyen90 stnguyen90 deleted the feat-default-sort branch August 9, 2023 17:15
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

Successfully merging this pull request may close these issues.

3 participants