You need to sign in to do that
Don't have an account?
sampathawaduge sameera
What is the advantage of querying within loop?
what is the advantages of querying data withing the for loop itself like below
for(Account a:[select name from Account])
{
***logic***
}
for(Account a:[select name from Account])
{
***logic***
}
https://salesforce.stackexchange.com/questions/129706/which-one-is-better-loop-with-soql-or-create-a-list-then-loop
for heap size refrence : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm#total_heap_size_limit_desc
Thanks let us know if it helps
All Answers
https://salesforce.stackexchange.com/questions/129706/which-one-is-better-loop-with-soql-or-create-a-list-then-loop
for heap size refrence : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm#total_heap_size_limit_desc
Thanks let us know if it helps