Which action can a developer take to reduce the execution time of the following code? List allaccounts = [select id from account]; list allcontacts = [select id, accountid from contact]; for (account a :allaccounts){ for (contact c:allcontacts){ if(c.accountid = a.id){ //do work } } }
Currently there are no comments in this discussion, be the first to comment!