SQL query generated by the DataServer can use a client-side join
or server-side join
depending on whether USE-INDEX is specified in the query or if the index fields are specified in the BY clause when the query uses the single-shot query mechanism.
The single-shot query mechanism
will be used when a query uses a format similar to the following:
FOR EACH <table1>,
FIRST / LAST <table2> OF <table1>:
Sample queries against Sports2000:
For this query, The join will be processed server-side:
FOR EACH customer NO-LOCK USE-INDEX custnum WHERE custnum = 1,
FIRST order OF customer USE-INDEX custorder:
For this query, the join will be processed client-side:
FOR EACH customer NO-LOCK WHERE custnum = 1,
FIRST order OF customer
BY customer.custnum BY order.custnum BY order.ordernum:
Index rules used by single-shot query mechanism not covered in DataServer Documentation.