Exam CRT-450 Topic 3 Question 189 Discussion
Actual exam question for Salesforce's CRT-450 exam
Question #: 189
Topic #: 3
Question #: 189
Topic #: 3
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
Which consideration should the developer be aware of when deciding between SOQL and SOSL?
Choose 2 answers
Suggested Answer: A,C Vote an answer
SOSL and SOQL are two different types of search languages in Salesforce. SOSL is a programmatic way of performing a text-based search against the search index, while SOQL is the equivalent of a SELECT SQL statement and searches the org database1. The developer should consider the following factors when deciding between SOQL and SOSL2:
* The number of records to be returned: SOSL can return up to 2,000 records from multiple objects, while SOQL can return up to 50,000 records from a single object or from multiple objects that are related to one another1.
* The speed of text searches: SOSL is generally faster than SOQL for text searches, especially if the search expression uses a CONTAINS term. SOSL can tokenize multiple terms within a field and build a search index from this, which makes SOSL searches more efficient and relevant1.
* The knowledge of the object or field: SOSL is useful when the developer does not know which object or field the data resides in, and wants to retrieve data for a specific term across multiple objects and fields. SOQL is useful when the developer knows which objects the data resides in, and wants to retrieve data from a single object or from multiple objects that are related to one another1.
* The type of data to be retrieved: SOSL supports text, email, and phone fields, and can retrieve data that is in Chinese, Japanese, Korean, or Thai. SOQL supports number, date, or checkbox fields, and can retrieve data from big objects1. References:
* Introduction to SOQL and SOSL | SOQL and SOSL Reference | Salesforce Developers
* Difference between SOSL and SOQL search types - Salesforce
* The number of records to be returned: SOSL can return up to 2,000 records from multiple objects, while SOQL can return up to 50,000 records from a single object or from multiple objects that are related to one another1.
* The speed of text searches: SOSL is generally faster than SOQL for text searches, especially if the search expression uses a CONTAINS term. SOSL can tokenize multiple terms within a field and build a search index from this, which makes SOSL searches more efficient and relevant1.
* The knowledge of the object or field: SOSL is useful when the developer does not know which object or field the data resides in, and wants to retrieve data for a specific term across multiple objects and fields. SOQL is useful when the developer knows which objects the data resides in, and wants to retrieve data from a single object or from multiple objects that are related to one another1.
* The type of data to be retrieved: SOSL supports text, email, and phone fields, and can retrieve data that is in Chinese, Japanese, Korean, or Thai. SOQL supports number, date, or checkbox fields, and can retrieve data from big objects1. References:
* Introduction to SOQL and SOSL | SOQL and SOSL Reference | Salesforce Developers
* Difference between SOSL and SOQL search types - Salesforce
by Kyle at Sep 02, 2024, 07:32 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).