nacho
nacho5mo ago

you know how many records can we return

you know how many records can we return per query? like max?
4 Replies
erquhart
erquhart5mo ago
You can get up to maybe a couple thousand in my experience, but it's a bad idea. No need to pack out a query like that, paginate instead. I typically cap it in the low hundreds, personally. Recommend checking out Zen of Convex to better understand how to work with the sync engine: https://docs.convex.dev/understanding/zen
The Zen of Convex | Convex Developer Hub
Convex best practices and design philosophy
jamwt
jamwt5mo ago
it's a good rule of thumb to keep in mind that you always want OLTP queries to be < 100ms or so that's a good target so more than a few hundred records, it's time to paginate
nacho
nachoOP4mo ago
thanks guys with pagination, do you guys think I can fetch a total of a 1million records?
jamwt
jamwt4mo ago
yep

Did you find this page helpful?