SAA Application Performance & Scalability 1 — Questions and Answers
Question 1: What is the maximum number of SOQL queries allowed per Apex transaction in Salesforce?
- 50
- 100 (Correct answer)
- 150
- 200
Correct answer: 100
Salesforce enforces a governor limit of 100 SOQL queries per synchronous Apex transaction.
Question 2: Which Salesforce feature creates a separate, leaner copy of a large object table to improve query performance?
- External Objects
- Skinny Tables (Correct answer)
- Custom Indexes
- Platform Cache
Correct answer: Skinny Tables
Skinny tables are Salesforce-maintained copies of standard or custom object tables that include only frequently queried fields, significantly improving read performance on large data volumes.
Question 3: An Apex transaction needs to process 500,000 records nightly. Which Apex pattern is most appropriate?
- Queueable Apex
- Future Methods
- Batch Apex (Correct answer)
- Scheduled Apex alone
Correct answer: Batch Apex
Batch Apex is designed for processing large volumes of records by breaking them into manageable chunks, each with its own governor limit context.
Question 4: What is the recommended optimal batch size when using Batch Apex to avoid SOQL row limit errors while maximizing throughput?
- 50
- 200 (Correct answer)
- 2000
- 10000
Correct answer: 200
A batch size of 200 is the default and generally optimal, balancing governor limits (such as 50,000 SOQL rows) against processing efficiency.
Question 5: Which Salesforce feature allows caching of frequently accessed data at the org, session, or partition level to reduce repeated database queries?
- Custom Settings
- Platform Cache (Correct answer)
- External Cache
- Static Resources
Correct answer: Platform Cache
Platform Cache provides a dedicated caching layer in Salesforce at org or session scope, reducing redundant SOQL queries and improving application performance.
Question 6: A SOQL query is considered 'selective' when it uses indexed fields in the WHERE clause. Why is selectivity critical for Large Data Volume orgs?
- It reduces API call counts
- It prevents full table scans that degrade query performance (Correct answer)
- It enables skinny table creation
- It bypasses sharing rules
Correct answer: It prevents full table scans that degrade query performance
Selective queries allow Salesforce to use indexes to retrieve a small subset of records, avoiding costly full table scans that become exponentially slower as data volume grows.
Question 7: What is the maximum CPU time limit per Apex transaction in synchronous contexts?
- 5,000 ms
- 10,000 ms (Correct answer)
- 15,000 ms
- 60,000 ms
Correct answer: 10,000 ms
Salesforce enforces a 10,000 ms (10-second) CPU time limit for synchronous Apex transactions to ensure fair resource sharing across the platform.
What is the maximum number of SOQL queries allowed per Apex transaction in Salesforce?