Skip to main content
Zachariah Rosenberg 님이 #Apex에 질문했습니다
Hello,

I'm trying to strategize how best to run this series of SOQL queries without triggering the limits. I have a csv of approximately 10,000 records. The goal is to check for each record whether there is a contact.owner.name associated with it. For instance (not complete, of course):

For(integer i:[csv file]){

SELECT Contact.Owner.Name. Contact.Custom_Field__c FROM Contact WHERE Contact.Custom_Field__c = csvFile[i]

}

How would you recommend I grab the data for all 10,000 records?

Thank you so much for your time and consideration of my inquiry.

With gratitude,

Zac
답변 2개
  1. 2015년 1월 15일 오후 4:27
    Looking at some example queries, I think I need to use the WHERE var IN List clause. The "IN" part, I was missing. @Anil, are you saying that regardless of how many I pack into the list (WHERE var in list), it will run in 200 record batches? So a list of 1,000 records would be 5 batches or 5 SOQL queries?
0/9000