Some background information about the processing of joins is required to understand how
search strategies are found for joins.Creating a Results Table for All Tables Linked by a Join
You can use a join to link up to 64 tables with each other. The system links the tables in steps; that is, one join is created from two tables. An additional table is then linked with the join result to form a new join.
The last temporary results table is the results table that the user wants.
Optimization of the Tables Linked by a Join
You can only save time or space during the processing of tables linked by a join if the temporary results tables are as small as possible and that the system can access the lines of each of the new tables to be linked as directly as possible.
The Optimizer therefore attempts to place small tables with restrictive search conditions at the beginning of the series of tables to be processed, in order to maintain small temporary results tables.
The order in which the tables are specified in the FROM clause of the SELECT statement has no influence on the order of processing. The Optimizer determines the order of processing itself.
Search Strategies
You can display the search strategies using the EXPLAIN statement (
EXPLAIN Statement for Joins).The following search strategies can be used to access lines in the new table, starting from the join column values of the old temporary results table.
JOIN VIA INDEXED COLUMN JOIN VIA KEY COLUMN JOIN VIA KEY RANGE JOIN VIA MULTIPLE INDEXED COLUMNS JOIN VIA MULTIPLE KEY COLUMNS JOIN VIA RANGE OF MULTIPLE INDEXED COL. JOIN VIA RANGE OF MULTIPLE KEY COLUMNSMulti-Column Key and Index Strategies
If two columns to be compared in a join step are not of the same length, not all of the search strategies can be used. We recommend that you define columns that are to be linked using a join with the same
domain to avoid this restriction.