Activity › Forums › Salesforce® Discussions › What is the maximum number of rows that SOQL and SOSL can “scan”?
Tagged: Limits in Salesforce, Salesforce SOQL, Salesforce SOSL, SOQL, SOQL Query, SOSL, SOSL Query
-
What is the maximum number of rows that SOQL and SOSL can “scan”?
Posted by Meddimala Ranjith on April 9, 2018 at 9:01 AMWhat is the maximum number of rows that SOQL and SOSL can “scan”?
Parul replied 7 years, 7 months ago 5 Members · 4 Replies -
4 Replies
-
Hi,
LIMIT is an optional clause that can be added to a SOSL query to specify the maximum number of rows that are returned in the text query, up to 2,000 results. If unspecified, the default is the maximum 2,000 results. The default 2,000 results is the largest number of rows that can be returned for API version 28.0 and later.
The LIMIT clause has no limit in and of itself. It’s limited to the context in which it’s used. If it’s used in Apex code it’s limited to the total governor limit for SOQL rows, which is currently 50,000. If it’s used in a query via the Web Service API then there is no limit.
Hope this helps you.
- [adinserter block='9']
-
Maximum Number of SOQL queries in a transaction: 100
Maximum Number of query rows in a transaction: 50000
Maximum Number of SOSL queries in a transaction: 20
-
Hi,
Found this online-
LIMIT is an optional clause that can be added to a SOSL query to specify the maximum number of rows that are returned in the text query, up to 2,000 results. If unspecified, the default is the maximum 2,000 results. The default 2,000 results is the largest number of rows that can be returned for API version 28.0 and later.
The LIMIT clause has no limit in and of itself. It’s limited to the context in which it’s used. If it’s used in Apex code it’s limited to the total governor limit for SOQL rows, which is currently 50,000. If it’s used in a query via the Web Service API then there is no limit.
Hope this helps.
-
The Governor Limits enforces the following:-
Maximum number of records that can be retrieved by SOQL command: 50,000.
Maximum number of records that can be retrieved by SOSL command: 2,000
Log In to reply.