+ Start a Discussion
sampathawaduge sameerasampathawaduge 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])
Best Answer chosen by sampathawaduge sameera

All Answers

Raj VakatiRaj Vakati
It's going to reduce the heap size. Its one of the technique to reduce the heap size 
Raj V awesome 👌
This was selected as the best answer