In Extended Parallel Server, the LOCAL table feature allows client applications to read data only from the local fragments of a table. In other words, it allows the application to read only the fragments that reside on the coserver to which the client is connected. This feature supports application partitioning. An application can connect to multiple coservers, execute a LOCAL read on each coserver, and assemble the final result on the client computer.
You qualify the name of a table with the LOCAL keyword to indicate that you want to retrieve rows from fragments only on the local coserver. The LOCAL keyword has no effect on data retrieved from nonfragmented tables.
When a query involves a join, you must plan carefully if you want to extract data that the client can aggregate. The simplest way to ensure that a join will retrieve data suitable for aggregation is to limit the number of LOCAL tables to one. The client can then aggregate data with respect to that table. The following example shows a query that returns data suitable for aggregation by the client:
SELECT x.col1, y.col2 FROM LOCAL tab1 x, tab2 y INTO TEMP t1 WHERE x.col1 = y.col1; | {can be aggregated by client} {tab1 is local} |
The following example shows data that the client cannot aggregate:
SELECT x.col1, y.col2 FROM LOCAL tab1 x, LOCAL tab2 INTO SCRATCH s4 WHERE x.col1 = y.col1; | {client cannot aggregate} {tab1 and tab2 are local} |
The client must submit exactly the same query to each coserver to retrieve data that can be aggregated.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]