We have a Heroku Postgress setup which has contact object data of our sfdc org synching every 5 mins ( bidirectional ). I have a use case where I need to manipulate approx. 20 million contact recs. Since, in start method I can query up to 50K, running the batch for every 50K recs would kill the org health. So, we are thinking of going with Bulk API 2.0. Querying those 20Mil recs, having it in csv & using Bulk API would also need manual intervention.
So, the question is, does anyone has better solution to tackle this using Heroku ? if yes, can you pls let me know how I can query them and processing it in Salesforce.
My thought process is to have an integration where I send a query to Heroku, it will take it's own time query recs and once the query has returned values, use some middleware to process in chunks... something of this sort.
-P.s, I am very new to Heroku. Any suggestions would be really helpful.