rhys1790R
Convex Community17mo ago
44 replies
rhys1790

Querying for random record

I was wondering if there is a standard way for querying for a random record.

Some ways I have thought about achieving this:
- Counting number of records and generating a number between 0 - n (falls over on deleted records and relies on a lengthy count call)
- Creating indexes that reoorder and then query the indexes.
Was this page helpful?