ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 82 - Certified Data Architect discussion

Report
Export

A customer is facing locking issued when importing large data volumes of order records that are children in a master-detail relationship with the Account object. What is the recommended way to avoid locking issues during import?

A.
Import Account records first followed by order records after sorting order by OrderID.
Answers
A.
Import Account records first followed by order records after sorting order by OrderID.
B.
Import Account records first followed by order records after sorting orders by AccountID.
Answers
B.
Import Account records first followed by order records after sorting orders by AccountID.
C.
Change the relationship to Lookup and update the relationship to master-detail after import.
Answers
C.
Change the relationship to Lookup and update the relationship to master-detail after import.
D.
Import Order records and Account records separately and populate AccountID in orders using batch Apex.
Answers
D.
Import Order records and Account records separately and populate AccountID in orders using batch Apex.
Suggested answer: B

Explanation:

Importing Account records first followed by order records after sorting orders by AccountID is the recommended way to avoid locking issues during import. This can reduce the number of lock contention errors by minimizing the number of parent records that are concurrently processed by multiple batches.Sorting orders by AccountID can also group the child records by their parent records and avoid updating the same parent record in different batches3. Importing Account records first followed by order records after sorting order by OrderID will not help with avoiding locking issues because it does not group the child records by their parent records. Changing the relationship to Lookup and updating the relationship to master-detail after import will not work because changing a relationship from Lookup to master-detail requires that all child records have a parent record, which may not be the case after import. Importing Order records and Account records separately and populating AccountID in orders using batch Apex will not help with avoiding locking issues because it still requires updating the parent records in batches.

asked 23/09/2024
Catarina Machado
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first