Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 12 Question 22 Discussion

Posted by Jennie on May 09, 2022 at 07:56 PM

What is the maximum number of SOQL queries used by the following code? List aList = [SELECT Id FROM Account LIMIT 5]; for (Account a : aList){ List cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); }

Suggested Answer: B

Get Premium DEX-450 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
13 comments · newest first
TA
Tayna 12 months ago
I’m surprised it’s that many! I would have guessed fewer.
PA
Pansy 12 months ago
Wait, are you sure? I thought it was only 1 query.
KA
Kallie 12 months ago
Totally agree with Earleen, that makes sense!
DO
Dominga 1 year ago
I think it's actually just 2 queries.
EA
Earleen 1 year ago
It's 6 queries total. 5 for the accounts and 1 for the contacts.
IR
Iraida 1 year ago
I’m a bit confused about the inner loop. Does it count as one query per account? I thought it might just be 2 total.
TR
Tran 1 year ago
If I recall correctly, the outer query counts as one, and then the inner query runs for each account, so that makes it 6, right?
JE
Jerry 1 year ago
I remember something about SOQL limits, but I’m not sure if it’s 5 or 6 total. I feel like I’ve seen a similar question before.
BR
Britt 1 year ago
I think the first query gets 5 accounts, but then there’s a query inside the loop for each account, so that could be tricky.
LO
Louann 1 year ago
Hmm, this is a tricky one. I'm leaning towards the Text Date field type, since that could potentially show trending data over time. But I'm not 100% confident in that answer.
JO
Jospeh 1 year ago
Hmm, I'm a bit torn on this one. The client wants to complete the migration as soon as possible, so option A with multiple ETL rounds might be the fastest approach. But then again, the manual authoring for the unique pages in option B could be more reliable. I'll have to think this through a bit more.
SO
Sophia 1 year ago
Hmm, I'm a bit confused by the SAVEPOINT and ROLLBACK commands here. I'll need to walk through the steps to understand how the table is affected at each point.
TA
Tawna 1 year ago
I remember that in our last review session, we discussed the importance of exit-phase reviews, but I'm not sure if they should be formal or lightweight for this scenario.
0/2000 characters

Save Cancel