Before creating a case
- Do you know how to analyze your query?
- Use the "Query Plan Tool" available in Developer console to check the query plan for any SOQL queries. For more information on how to use the tool to tune queries, please refer Run the query on Query Plan tool.
- You can improve the performance of the query by adding selective filters. For more information on how to make a query selective, please refer
- A quick cheat sheet for query and search optimization, Query & Search Optimization Cheat Sheet.
Details to include for a custom index request
Be sure that you include this information in your request, the reason why this information needs to be provided is outlined below.
- Fields to be indexed - Makes sure we know which fields to focus on and which fields to leave alone.
- SOQL query with bind values - Including the fields as part of filter criteria. We may need a query which has a filter on Severity__c, if you have provide login access we can query some sample values for custom field Severity__c and we can run the query.
- Select Id, Case_Number__c from Case where Severity__c = 'Critical' - Correct , here Critical is a bind value.
- Select Id, Case_Number__c from case where Severity__c = :severityLevel - Incorrect, we can't run this query.
- Login access - With login access, we'll be able to replicate and understand the issue correctly.
- Error messages/time stamps - Any error logs/time-stamps will help us in understanding the need for index.
- Steps to replicate the error - ensures that we follow the same path you took so we can better understand the issue.
- Evaluate possibilities of adding additional filters - Sometimes, adding any additional filters to the query without impacting the functionality can resolve the issue without having to add an index. Where we can't index or where the index turns out to be negative, we recommend adding additional filters to the query to reduce the number of resulting records. If this isn't possible, provide the reason you won't be able to add additional filters so that we can check for additional possibilities.