I have batch which queries for record in a standard object which has 16 million of records. I am trying to query only few records with checkbox checked using querylocator to delete it .
However the query takes too long to process and times out.
The query used is "
Select id, Delete_Social_Post__c,xxx_c,ExternalId_c, CreatedDate From SocialPost where Delete_Social_Post__c = true Order by createddate asc "