SAA Application Performance & Scalability 2 — Questions and Answers
Question 1: Which approach should an architect recommend to allow external systems to upsert Salesforce records without knowing internal Salesforce IDs?
- Use Record Types as keys
- Define an External ID field on the object (Correct answer)
- Use composite APIs with lookup fields
- Store IDs in Custom Metadata
Correct answer: Define an External ID field on the object
External ID fields allow external systems to use their own identifiers for upsert operations, enabling idempotent integrations without needing Salesforce-generated IDs.
Question 2: A Visualforce page is experiencing slow load times due to excessive view state. What is the maximum allowed view state size?
- 64 KB
- 128 KB (Correct answer)
- 256 KB
- 512 KB
Correct answer: 128 KB
Visualforce view state is capped at 135 KB (often cited as 128 KB threshold for practical purposes); exceeding it causes errors and requires reducing data stored in state.
Question 3: What is the primary advantage of using Queueable Apex over Future Methods?
- Queueable Apex supports chaining and can accept non-primitive parameters (Correct answer)
- Queueable Apex bypasses all governor limits
- Queueable Apex runs synchronously for faster execution
- Queueable Apex supports bulk DML with no limit
Correct answer: Queueable Apex supports chaining and can accept non-primitive parameters
Queueable Apex supports job chaining (enqueueing another job from within a job) and accepts complex object types as parameters, making it more flexible than Future Methods.
Question 4: In a Large Data Volume environment, which index type must Salesforce Support enable, as it is not available through Setup by default?
- Standard Index
- Custom Index (Correct answer)
- Skinny Table Index
- Composite Index
Correct answer: Custom Index
Custom Indexes are created by Salesforce Support upon request and are applied to fields that need to be indexed to improve query selectivity on high-volume objects.
Question 5: Platform Events in Salesforce are primarily used to improve scalability by enabling which architectural pattern?
- Synchronous point-to-point integration
- Event-driven architecture with decoupled producers and consumers (Correct answer)
- Batch data processing pipelines
- Real-time UI refresh via Apex callbacks
Correct answer: Event-driven architecture with decoupled producers and consumers
Platform Events implement an event-driven publish/subscribe model that decouples systems, allowing producers to publish events without waiting for consumers, improving throughput and resilience.
Question 6: When should an architect choose SOSL (Salesforce Object Search Language) over SOQL for a use case?
- When querying a single object with known field values
- When searching for a term across multiple objects and fields simultaneously (Correct answer)
- When performing aggregate queries like SUM or COUNT
- When filtering by date ranges on large datasets
Correct answer: When searching for a term across multiple objects and fields simultaneously
SOSL is optimized for full-text search across multiple objects and fields at once, leveraging Salesforce's search index rather than performing per-object SOQL queries.
Question 7: A custom object has 10 million records and queries are timing out. Salesforce Support confirms the WHERE clause field is indexed. What should the architect investigate next?
- Increase SOQL query timeout via setup
- Check if the query is non-selective due to too many matching records (>10% of total) (Correct answer)
- Switch from SOQL to Apex loops for filtering
- Enable field history tracking
Correct answer: Check if the query is non-selective due to too many matching records (>10% of total)
Even indexed fields become non-selective if the query matches more than roughly 10% of total records, causing Salesforce to fall back to a full table scan and ignore the index.
Which approach should an architect recommend to allow external systems to upsert Salesforce records without knowing internal Salesforce IDs?