2.2.17. Query optimisation

  • External sorting
    • Stems from large disk (2y), small memory (1y)
    • Sort-merge strategy
      • Sort runs (small sets of total data file)
      • Then merge runs back together
    • Used in
      • SELECT, to accelerate selection (by index)
      • PROJECT, to eliminate duplicates
      • JOIN, UNION and INTERSECTION