Activity Forums Salesforce® Discussions Why formula fields can not be added as custom index in salesforce?

  • Manpreet

    Member
    January 18, 2018 at 5:13 am

    Hi Saurabh,

    Formula fields are custom fields that can help you dynamically calculate the value of a field based on other fields, expressions, or values.As you can with any other field, you can use formula fields to filter SOQL queries. For example, you might write a query such as:
    [SELECT Id, Name FROM Contact WHERE FormulaField__c = '10'];
    Just because you can filter queries using a formula field doesn’t mean that you should, however. By default, formula fields don’t have underlying indexes, so they require full scans to find target records. They also have to calculate values on the fly because actual values are not stored in the database. So when an object has a lot of records, queries that filter using a formula field can be painfully slow.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos