Skip to content

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
@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.

4 participants