Engineering/Engineering Principles/8 Performance And Scalability/Database Performance/

Database Performance Standards · PERF-01

Regular database reindexing must be performed · PERF-01.1 · MUST · DEV

Where possible, regular database reindexing should be automated, e.g. a script running on a schedule.

Restricted
Login to display internal content.
There are some useful resources in the Audacia wiki.

Data archiving must be considered · PERF-01.2 · MUST · DEV

This may not always be possible, but must always be considered.

Database queries must be optimized · PERF-01.3 · MUST · DEV

Basic optimizations must be performed, for example:

  • Projecting entities to a DTO if an untracked subset of data is needed
  • Applying in-database filtering to restrict data returned to what is required
  • Using the most efficient aggregation technique, e.g. if using Entity Framework, prefer Any() over Count() > 0
  • If using Entity Framework, eliminate unnecessary Include() statements and don’t track entities that will not be updated