DELETE, INSERT, and UPDATE statements first fetch the qualifying rows and then perform the delete, insert, or update.
If the data is not in a single local fragment of a table, the database server fetches the qualifying rows in parallel, with one exception. The database server does not process the first part of a DELETE statement in parallel if the targeted table has a referential constraint that can cascade to a child table.
The database server inserts data into temporary or external tables in parallel in the following cases:
The optimizer can insert rows in parallel into explicit temporary tables that you specify in SQL statements of the form SELECT....INTO TEMP or SELECT...INTO SCRATCH. For example, the optimizer can perform the inserts in parallel into the temporary table, temp_table, as the following sample SQL statement shows:
SELECT * FROM table1 INTO SCRATCH temp_table
To perform the insert in parallel, the database server first creates a fragmented temporary table in the space as specified by the setting of the DBSPACETEMP configuration parameter or the DBSPACETEMP environment variable. The optimizer then writes in parallel to each of the fragments in a round-robin fashion. Performance usually improves as the number of fragments increases.
For more information on temporary tables, refer to Using Temporary Tables and the IBM Informix: Guide to SQL Syntax.
For example, the database server processes the following INSERT statement in parallel:
INSERT INTO target_table SELECT * FROM source_table
The target table can be either a permanent table or a temporary table.
The database server processes this type of INSERT statement in parallel only when the in the following circumstances:
On a single-coserver configuration, the NUMCPUVPS configuration parameter must be greater than 1. On a multiple-coserver configuration, the NUMCPUVPS configuration parameter can be set to 1.
For index builds, the database server performs both scans and sorts in parallel. The following operations start index builds:
Parallel execution can occur during index builds when any of the following conditions exist:
If your coservers have multiple CPUs, the optimizer uses one sort thread per CPU virtual processor during index builds.
For more information about index builds, refer to Improving Performance for Index Builds.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]