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
DbjensenDbjensen 

Use 'Query Plan Tool' to see if a field qualifies for indexing

Hello - I am using the Query Plan Tool to see if a formula field qualifies for indexing. The formula field is called FirstLastNameStreetAndZipCode__c and is on the contact object. 

I'm using this query to get the cost:

SELECT Id FROM Contact WHERE FirstLastNameStreetAndZipCode__c = 'Jensen43289874'   

In production, I get a cost of 0.0 but in the sandbox I'm getting 2.8. Is this the correct query to use to test formula fields for indexing? 

User-added image
Best Answer chosen by Dbjensen
AbhishekAbhishek (Salesforce Developers) 
Hi,

Yes, you are correct.

But the results will show based on data, I suspect in production and sandbox the data is different.

That's why you are seeing different results.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks.
 

All Answers

AbhishekAbhishek (Salesforce Developers) 
Hi,

Yes, you are correct.

But the results will show based on data, I suspect in production and sandbox the data is different.

That's why you are seeing different results.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks.
 
This was selected as the best answer
DbjensenDbjensen
Great, thank you so  much. I appreciate the help.