SOQL
|
SOSL
|
Salesforce object query language
|
Salesforce object search language
|
It is used to retrieve records from salesforce org’s object.
|
SOSL do text-based searching in salesforce orgs.
|
In SOQL object is necessary.
|
In SOSL object is not necessary.
|
Select statement is used.
|
Find keyword is used.
|
Id is by default returned by SOQL statement.
|
SOSL returns by default id’s of matched records.
|
SELECT Id, Name FROM Account WHERE Name = 'Acme'
|
FIND {Joe Smith} IN Name Fields RETURNING lead (name, phone)
|
We can retrieve data from single object or from multiple objects
that are related to each other.
|
We can retrieve multiple objects and field values efficiently
when the objects may or may not be related to each other.
|
We can Query on only one object.
|
We can query on multiple objects.
|
Governer Limit:
- Total number of SOQL queries issued 100 (Synchronously)
- Total number of SOQL queries issued for Batch Apex and future methods 200 (Asynchronously)
- Total number of records retrieved by SOQL queries 50,000
- Total number of records retrieved by Database.getQueryLocator 10,000
- Total number of SOSL queries issued 20
- Total number of records retrieved by a single SOSL query 200
Comments
Post a Comment