Hey all, I have a basic question to ask. What's th...
# orm-help
j
Hey all, I have a basic question to ask. What's the best way to loop through all rows in a table? Let's say the table has ~3m rows. I need to perform some action for every row. Do I need to sort the table when performing findMany or will prisma use some implicit ordering by default?
a
You'd probably want to get batches of datas and use cursor pagination
n
Hey Jason 👋 As Austin mentioned it would be a good idea to use cursor based pagination, Also, it is not necessary to sort the table through
orderBy
unless there’s any specific requirement in your use case, prisma would just return records ordered by your primary key/id