SQL Tuning / SQL 性能 优化 调优

时间:2023-03-09 14:53:43
SQL Tuning / SQL 性能 优化 调优

Some key concents regarding SQL optimization

  • predicate
  • selectivity (column unique ratio) / cardinality (estimated returned)
  • driving (outer) table
  • access path/method (e.g. Table Scan, Index Uique/Range Scan)
  • join method (e.g. Nested Loops or Sort Merge)
  • join order (which table first as outer table)
  • join Types (Inner, semi - IN or Exists, anti - Not IN/Not Exists)