You need to sign in to do that
Don't have an account?
eyekamey
How to process 100k records in Apex class
Hello, I have a requirement to build a lightning component to allow users upload csv files. These files have 100k rows and multiple users can upload large files at the same time. It's possible to have 15 files uploaded at the same time each with 100k rows. I need to have an apex class that processes these files and creates either leads or contacts from the rows based on some business logic.
My first thought was to run an apex batch to process the files, but only up to 5 queued or active batch jobs are allowed. Any thoughts or recommendations? Thanks in advance!
My first thought was to run an apex batch to process the files, but only up to 5 queued or active batch jobs are allowed. Any thoughts or recommendations? Thanks in advance!
Your query is answered in the below blogs,
https://developer.salesforce.com/forums/?id=906F0000000AjuVIAS
https://www.solunus.com/apex-best-practices
https://salesforce.stackexchange.com/questions/60121/best-way-to-schedule-update-of-100k-records
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Try using Apex Flex Queue.
Thanks,
Sucharita