Using join indexes
164
A natural join between the
id
columns of
sales_order
and
sales_order_items
makes more sense. In this case, the columns with the same name should contain
matching values. The command to create a join index based on a natural join
between these two tables is:
CREATE JOIN INDEX sales_order_so_items_join
FOR sales_order NATURAL FULL OUTER JOIN
sales_order_items
Creating a join index in Sybase Central
To create a join index in Sybase Central, follow these steps.
❖
To add a join index in Sybase Central:
1
Select the Join Indexes folder in the left panel of the Sybase Central
window.
2
Double-click the Add Join Index object in the right panel to open the Join
Index editor.
3
Highlight <Unnamed> in the Name box and enter a name for the index.
4
From the Left Table Name dropdown, select a table name. Repeat for the
Right Table Name.
5
Select a Join Type from the dropdown. If you select a type other than
Natural, specify the Join Columns.
6
Click Advanced Properties to add a comment.
7
If you are only joining two tables, click Save and Commit.
8
To join more than two tables, click Add Row. In the new row that appears,
enter the next table to join in the Right Table Name column. Then click
Save and Commit.
Types of join hierarchies
Adaptive Server IQ supports two different types of join hierarchies:
•
Linear joins
•
Star joins
You create join indexes or ad hoc joins for both linear and star joins.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...