I've run into a sticky situation for a client in which they are unable to run a duplicate job broadly in their org without it failing due to it being a HUGE org with tens of millions of records. This is a known issue in Salesforce. The "workarounds" they prescribe in this article however are super weak sauce and far from sufficient.
This is a major issue for existing records that pre-dated the creation of this dupe rule, as there is some logic in this org that relies upon duplicate rules having run on a given record before it is processed, so that related duplicate record sets can be evaluated and decisions made based on whether duplicates exist before moving on to other (else) logic.
Long story short, I'm wondering if there is a method in apex somewhere that can be called against a record or set of records so that duplicate rules are evaluated right then and there. E.g. something like:
database.checkForDuplicates(sObject record,Id duplicateRuleId)
I'm not holding my breath but man, something like this would be a lifesaver!
Thanks so much.