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
PlatFormCloudPlatFormCloud 

Query on Custom Indexing

Hi,
By reading the SalesForce documentation, I did understand to write a best SOQL query we need to write  Selective SOQL query  and need to use of INDEXING  in Field. 

My questions are: 
1. What is basically mean by "INDEXING" on a field?
2. In the documentation - below statement is written-

SELECT Id FROM Account WHERE Id IN (<list of account IDs>)
The WHERE clause is on an indexed field (Id). If SELECT COUNT() FROM Account WHERE Id IN (<list of account IDs>)returns fewer records than the selectivity threshold, the index on Id is used. 


What do we mean by : selectivity threshold ?   Please explain.

Thanks!