Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

General

 

  • get only necessary data, rather than everything that can be
  • sometimes is good to prepare specific object(model) for different views, rather than use standard model on each view.
  • for example for list prepare custom header dto (data transfer object) object with only primitive types with calculated values from dependent entities

SQL optimizations

  • use syntax 'JOIN table ON ()' rather than 'FROM tableA, tableB WHERE ...'
  • use more restrictive and fast conditions first
  • it's better because database in each next step have less records to verify
  • use indexes

https://wiki.postgresql.org/wiki/Performance_Optimization
https://wiki.postgresql.org/wiki/SlowQueryQuestions
http://explain.depesz.com/

  • No labels