Activity Forums Salesforce® Discussions What is the best and efficient way to handle data volume in the Salesforce Query?

  • Parul

    Member
    September 13, 2018 at 4:36 am

    Hi Syed,

    Salesforce has come up with a new concept - BIG OBJECT

    The best and efficient way to handle data volume in the query by Sync SOQL or Async SOQL. It can hold billions of records. Although, it has some limitations. You can not work with it like a Custom object.

    But it holds the (m+) of records.

    Hope this will help you!

    Thanks.

  • shariq

    Member
    September 14, 2018 at 1:47 am

    Hi,

    For best performance, SOQL queries must be selective, particularly for queries inside triggers. To avoid long execution times, the system can terminate nonselective SOQL queries. Developers receive an error message when a non-selective query in a trigger executes against an object that contains more than 200,000 records. To avoid this error, ensure that the query is selective.

    Selective SOQL Query Criteria

    • A query is selective when one of the query filters is on an indexed field and the query filter reduces the resulting number of rows below a system-defined threshold. The performance of the SOQL query improves when two or more filters used in the WHERE clause meet the mentioned conditions.
    • The selectivity threshold is 10% of the first million records and less than 5% of the records after the first million records, up to a maximum of 333,333 records. In some circumstances, for example with a query filter that is an indexed standard field, the threshold can be higher. Also, the selectivity threshold is subject to change.

    Hope this helps.

  • Syed J. Ahmed ☁

    Member
    September 25, 2018 at 11:06 pm

    Thanks for the reply.

    Can i share the code here as well

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos