If the user sets a config, the code should utilize the bulk api for queries. https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_using_bulk_query.htm Submit all the queries as bulk jobs and poll for results.