0

I have a Batch process which accepts 300,000 or so records from its query. When I run the query as a standalone in Query Editor or in Workbench, I get errors (discussed in last post Errors for count() via Dev Console (No response from the server) and Workbench (future_get-9-1588268637)).

I thought this was a problem with table size and a lack of indexes, as suggested in above ref post. But if that were so, why does it work with a standard report - which displays the 350,000 records in a matter of seconds?

The query generalizes to this:

SELECT count() 
FROM data__c 
WHERE date__c >= 2020-02-01 AND 
      date__c <= 2020-02-28 AND
      data2__r.program__c LIKE '%test%' AND 
      id IN :ids

All of the fields in the query are either indexed or an external Id, so I don't believe it is running as a non-indexed query. Overall it just doesn't make any sense to me. You would think as a developer, the stronger tools are the ones in the dev console, not on the client side. I feel like I'm doing something wrong.

Any insights would be appreciated.

Thanks, Taylor

2

0

You must log in to answer this question.

Browse other questions tagged .