This example shows you how to create join indexes.
The first join index, so_soi_jdx, joins
the sales_order and sales_order_items tables.
- Right-click Join Indexes, point
to New, and choose Join Index.
- In the Name and Table dialog, enter so_soi_jdx for
the name.
- In the Join Type dropdown list, select Natural, because
you are joining equivalent columns with the same name (id)
from two tables.
- Choose SalesOrders for the left
table.
- Choose SalesOrderItems for the
right table.
- Click Next. Sybase IQ locates the join columns.
- In the Comment space, type the following to describe
the join index, Join index for SalesOrders and
SalesOrderItems.
- Click Finish. The so_soi_jdx join
index appears in the Join Indexes folder.
Note: When joining with the NATURAL keyword, take care that only the columns
to be joined have the same name. (For example id = id.)
Watch out for common column names like date and description.