I have a custom object with around 25.000.000 records and need to perform a single count query to find those records where a field has a certain value.
I could get none of the following queries to run due to limitations. I know all of them but how should one do it then?!
SELECT Count()
FROM LargeObject__c
WHERE txt_State__c = 'Running'
or
SELECT txt_State__c, Count(Id)
FROM LargeObject__c
GROUP BY txt_State__c
I tested this in all available tools:
- the new Dev Console query editor
- Anonymous code query
- SoqlXplorer (uses bulk API)
but they all time out or throw limit errors.