function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

why we use index

By default  primary keys, forgeign keys, custom fields marked as External Ids/Unique along with the system dates (like last modified) are indexed.but you we need index?it it useful for reterive large record,Please explain
Amit Chaudhary 8Amit Chaudhary 8
1) Working with Very Large SOQL Queries then indexing is required.

User-added image

2) Improve performance with Custom indexes using Selective SOQL Queries

3) Know Thy Salesforce Field Indexes for Fast Reports, List Views, and SOQL

NOTE:- Indexes in a database are like the index in a book–they help you find what you are looking for fast. When you’re designing filters for a report, list view, or SOQL query, you can confirm that your filter condition fields have indexes by checking the field lists on an object’s detail page. Notice that the Indexed column clearly indicates whether a field has an index

Let us know if this will help you

Amit Chaudhary