While doing a left anti join in soql on a non-indexed field. The query is failing with QUERY_TIMEOUT.
'QUERY_TIMEOUT: Your query request was running for too long.'
Here is my query-
SELECT ID,Order__c FROM Agent_Credit__c WHERE Order__c NOT IN (SELECT Order__c from Opportunity)
I am running this as daily basis, but success rate is like once in a week. This is not the exact query what I am running but a similar example.