Reference Work Entry

Encyclopedia of Database Systems

pp 1582-1583

Join Order

  • Jingren ZhouAffiliated withMicrosoft Research

Synonyms

Join order; Join sequence

Definition

A database query typically contains multiple joins. When joins (for example, inner joins) are commutative and/or associative, there can more than one evaluation order for joins. The join order has an enormous impact on the query cost. One of the main responsibilities of the query optimizer is to determine the optimal join order for query evaluation.

Key Points

Choosing a good join order is very important to achieve a good query performance. One important consideration for choosing an join order is to reduce the size of intermediate results as much as possible. For example, it is beneficial to first evaluate a join that returns the least result. Other considerations include join methods, data properties, and access methods, etc.

Depending on the choice of join orders, query plans can be of different shapes.
  • Left-Deep query plans use a base table as the inner table for each join.

  • Right-Deep query plans use a base table as ...

This is an excerpt from the content