DATA-ARCHITECT practice question 26 of 35

Universal Container (UC) has around 200,000 Customers (stored in Account object). They get 1 or 2 Orders every month from each Customer. Orders are…

Full set: 257 questions
Universal Container (UC) has around 200,000 Customers (stored in Account object). They get 1 or 2 Orders every month from each Customer. Orders are stored in a custom object called "Order c"; this has about 50 fields. UC is expecting a growth of 10% year -over -year. What are two considerations an architect should consider to improve the performance of SOQL queries that retrieve data from the Order _c object? Choose 2 answers
Answer options
A: Use SOQL queries without WHERE conditions.
B: Work with Salesforce Support to enable Skinny Tables. Correct answer
C: Reduce the number of triggers on Order _c object.
D: Make the queries more selective using indexed fields. Correct answer
Correct Answer:
B. Work with Salesforce Support to enable Skinny Tables.; D. Make the queries more selective using indexed fields.
Explanation

For a custom object expected to grow to millions of records, SOQL query performance is critical. The two most effective strategies are making queries selective and using platform features like skinny tables. A selective query uses an indexed field in the WHERE clause to drastically reduce the number of records the database must scan. For frequently run reports and queries that involve joins or specific field combinations, a skinny table is a custom index created by Salesforce Support that contains copies of the data, providing a much faster retrieval path.

Why Incorrect

A. Queries without WHERE conditions, or with non-selective ones, cause full table scans, which is the primary cause of poor performance on large objects.
C. Triggers primarily impact DML performance (insert, update, delete), not the performance of standalone SOQL read queries, which is the focus of the question.

References

1. Salesforce Developer Documentation, Query & Search Optimization Cheat Sheet: "Make your queries selective." The document explicitly states that selectivity is the most important factor for query performance on large data volumes.

2. Salesforce Developer Documentation, Designing Record-Level Access for Enterprise Scale: Under the "Skinny Tables" section, it states, "For some frequently accessed fields, Salesforce can create a skinny table to improve performance on reports, list views, and SOQL queries."

3. Salesforce Architects, Salesforce Well-Architected - Data: Large Data Volumes: This guide details best practices for handling large data volumes, highlighting the importance of selective queries with indexed fields and the use of skinny tables as key performance optimization techniques.

Scroll to Top