PowerLens
All posts
DataverseApril 10, 2025· 2 min read

Optimizing Dataverse Performance: Queries, Indexes, and Caching

J

Juan Carlos Santiago

Optimizing Dataverse Performance: Queries, Indexes, and Caching

Optimizing Dataverse Performance: Queries, Indexes, and Caching

As your Dataverse tables grow, performance can degrade. Here are proven strategies to keep your applications fast.

Understanding Dataverse Limits

Before optimizing, know the boundaries:

  • API request limits — 6,000 requests per 5 minutes (per user)
  • Batch operations — Up to 1,000 records per batch
  • File size — 128 MB max per file column
  • Row size — 1 MB max per row (including all columns)

Indexing Strategies

Dataverse automatically indexes primary key columns, but you can add custom indexes:

When to Add an Index

  • Columns frequently used in filter conditions
  • Columns used in ORDER BY clauses
  • Lookup columns used in joins
  • Columns in views that users sort by

Index Limitations

  • Maximum 20 custom indexes per table
  • Each index can include up to 8 columns
  • Indexes add overhead to write operations

Query Optimization Tips

1. Select Only Needed Columns

Bad:

Retrieve all columns from Contact

Good:

Retrieve only firstname, lastname, email from Contact

2. Use Server-Side Filtering

Always filter on the server, never retrieve all records and filter client-side.

3. Paginate Large Result Sets

Use top and skip parameters or paging cookies for tables with more than 5,000 records.

4. Avoid N+1 Queries

Instead of querying a parent and then each child individually, use expand to retrieve related records in a single call.

Caching Patterns

  1. Browser caching — Cache reference data (dropdowns, lookups) on the client
  2. Application caching — Store frequently accessed data in collections (Power Apps)
  3. Concurrent loading — Load independent data sources in parallel, not sequentially

Monitoring Performance

  • Use the Power Platform Admin Center analytics
  • Monitor API capacity usage in the admin portal
  • Enable plugin profiler for custom code performance
  • Review slow queries in the Dataverse analytics dashboard
#dataverse#performance#optimization#indexes