Hey again, how would you guys handle fetching larg...
# orm-help
k
Hey again, how would you guys handle fetching large amount of data? Let's say I want to fetch 100K users from my database and export their data. What's the best way to do it?
👀 1
1
k
you could use
findall()
in small batches (eg. 5000 at a time) and paginate until you went through the whole thing
j
I can say Prisma does not support stream data now. in my experience I was using https://github.com/brianc/node-postgres/tree/master/packages/pg-query-stream to get large data
n
Do you want to fetch all 100K records in one go? You could use pagination to get records in batches.
k
Pagination it is, thanks 👍
🙌 1