Chapter 8. Indexing for Table Joins
Published Online: 27 JAN 2005
DOI: 10.1002/0471721379.ch8
Copyright © 2005 John Wiley & Sons, Inc.
Book Title

Relational Database Index Design and the Optimizers: DB2, Oracle, SQL Server, et al.
Additional Information
How to Cite
Lahdenmäki, T. and Leach, M. (2005) Indexing for Table Joins, in Relational Database Index Design and the Optimizers: DB2, Oracle, SQL Server, et al., John Wiley & Sons, Inc., Hoboken, NJ, USA. doi: 10.1002/0471721379.ch8
Publication History
- Published Online: 27 JAN 2005
- Published Print: 24 JUN 2005
ISBN Information
Print ISBN: 9780471719991
Online ISBN: 9780471721376
- Summary
- Chapter
Keywords:
- join terms;
- join techniques;
- table joins;
- join processing;
- nested loop joins;
- program joins;
- local predicates;
- join predicates;
- table access order;
- inner tables;
- outer tables;
- index design;
- QUBE;
- relative performance;
- merge scan joins;
- hash joins;
- join comparisons;
- hardware;
- basic question;
- BQ;
- basic join question;
- BJQ;
- multiple joins;
- subqueries;
- unions;
- poorly performing joins;
- table design;
- join effect on table design;
- denormalization;
- downward denormalization;
- upward denormalization;
- denormalization cost;
- unconscious table design
Summary
An introduction to, and the terms used by, the most common join techniques. Simple table join examples to illustrate the processing that takes place in a nested loop join - the most common join method; a comparison of a two table join SELECT with a program implemented two table access. The terms involved in the join process together with their significance: local and join predicates; the table access order; inner and outer tables. A case study to consider the importance of the table access order on the index design process, using the QUBE to illustrate the relative performance of three different program implementations. Merge scan joins and hash joins; comparisons with nested loop joins; why these join techniques have become more widely used with current hardware. Adapting the Basic Question, BQ, to table joins to formulate the basic join question, BJQ. Index design considerations when joining more than two tables together, and when using subqueries and unions. Why joins often perform poorly. Table design issues that should be considered with respect to joins; downward and upward denormalization; the cost of denormalization; NLJ and MS/HJ compared to denormalization; unconscious table design.
