Wednesday, January 22, 2014

Difference between SOSL and SOQL in Salesforce

Difference between SOSL and SOQL in Salesforce

SOSL
SOQL
stands for "Salesforce object search language".
stands for "Salesforce object query language".
Works on multiple object at a same time.
Need to write different SOQL for different object.
All fields are already text indexed.
SOQL against same field will be slow.
Cannot used in Triggers. Can only be used in Apex class and anonymous block.
Can be used in Apex class and Triggers.

No comments:

Post a Comment