Print this page

How to Improve Listview Performance

Knowledge Article Number 000170670
Learn tips and best practices to improve performance for your List Views.

List View Performance

Here are our top 5 best practices: 
1.  Use 'EQUALS' operator rather than 'CONTAINS' operator.
2.  Use the 'AND' statement rather than 'OR' statement.
3.  Use Literal Date Values to select smaller data sets.
4.  Reduce the number of fields being displayed - particularly Formula Fields.
5.  Add additional 'AND' filters to narrow down the results.

More Tips: 
  • To determine the improved performance, it can be a trial and error process.  Each user might have different performance results as it also depends on many factors such as their role and visibility of records.
  • List Views are designed for a snapshot view of current and important records which can be scanned and actioned by the user. From a usability perspective, our product managers have determined that the maximum number of records that should be handled in a single List View is 2000. Anything over that should be handled in a report.
  • List View results are truncated at 2000 records, so the resource consumption accessing anything over this number is wasted. If it's known that the number of records being returned is more than 2000 then it's highly recommended to add selective filters to bring the number of records below that limit.

Advanced Tips for Administrators

  • A filter criteria can be tested by executing a similar SOQL query through Workbench. You can use the SOQL Query tool to quickly check how many records it would return for that particular filter set.
  • If a List View returns fewer than 2000 records, yet still visibly takes time to load, then your System Administrator can ask Salesforce Support to possibly "Index" a filter on the database tables.

Enhanced List views (Visualforce Page Optimization)

  • If a Visualforce (VF) page has an Enhanced List View that's taking a long time to load, a Developer can modify the "listId" attribute to default the view to a specific one that is selective such as "TODAY."
<apex:enhancedList listId="00BQ00000011DJR" height="600" customizable="false" rowsPerPage="25"/>

promote demote