Which of these is better:
object__c[] objects = [SELECT name FROM object__c
WHERE opportunity__c IN
(SELECT OpportunityId From OpportunityLineItem WHERE Product2.Family = 'My Item')];
or:
opportunityLineItem[] opIds = [SELECT OpportunityId FROM OpportunityLineItem WHERE Product2.family = 'My Item')];
object__c[] objects = [SELECT name FROM object__c WHERE opportunity__c IN :opIds];
Basically, if the id is checking WHERE In an inner query does it run that inner query for each element returned, or does it just run it once and then use that value to check?