Salesforce-Platform-Developer Practice Test

Salesforce Spring 25 Release
237 Questions

Universal Containers hires a developer to build a custom search page to help user- find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field. Which consideration should the developer be aware of when deciding between SOQL and SOSL? Choose 2 answers

A. SOSL is able to return more records.

B. SOQL is faster for text searches.

C. SOSL is faster for tent searches.

D. SOQL is able to return more records.

C.   SOSL is faster for tent searches.
D.   SOQL is able to return more records.

Explanation:

1️⃣ SOSL is faster for text searches (C)

SOSL searches across multiple objects and fields in a single query, making it more efficient for text-based searches.
It scans indexed fields quickly, making it ideal for searching Name, Description, and Comments fields in large datasets.
Best for keyword searches, such as finding records containing a specific phrase.

2️⃣ SOQL is able to return more records (D)

SOQL retrieves a larger result set, allowing up to 50,000 records per query, while SOSL returns only the first 200 records per object.
SOQL is best when searching structured data with filtering, such as retrieving Accounts based on specific criteria.
Ideal for querying specific fields from a single object, rather than searching text across multiple objects.

Salesforce-Platform-Developer Practice-Test - Home Previous
Page 25 out of 237 Pages