Query running causing perfromance issue

For what its worth, this query is run by FactoryPMI (to look for duplicates) when the SQLTags system starts up. So under normal running conditions, it won’t run, and won’t be a problem. If it seems to be running more frequently, it is probably because your datasource connection is faulting out (for other reasons).

So from this perspective you’re really troubleshooting the symptom of a different problem. I suggest you look into why your datasource connection is periodically faulting out.