Recently I found a very nice article explaining in great detail how you can optimize SQL and Databases. It's including the biggest DB engines:

  • Oracle 12.2
  • MySQL 8.0.2
  • SQL Server 2014
  • PostgreSQL 9.6
  • DB2 LUW 10.5

Includes explanation and measurements. This is the article. A must read for junior DBAs. Enjoy reading:

10 Cool SQL Optimisations That do not Depend on the Cost Model