insert/delete/update

insert, delete, and update operations are done in serial in Adaptive Server. However, tables other than the destination table used in the query to qualify rows to be deleted or updated, can be accessed in parallel.

delete from RA2
where exists
(select * from RB2 
where RA2.a1 = b1 and RA2.a2 = b2)

QUERY PLAN FOR STATEMENT 1 (at line 1).
Executed in parallel by coordinating process and 3 worker processes.

9 operator(s) under root

The type of query is DELETE.

ROOT:EMIT Operator

|DELETE Operator
|  The update mode is deferred.
|
|   |NESTED LOOP JOIN Operator (Join Type: Inner Join)
|   |
|   |   |SORT Operator
|   |   | Using Worktable1 for internal storage.
|   |   |
|   |   |   |EXCHANGE Operator (Merged)
|   |   |   |Executed in parallel by 3 Producer 
                  and 1 Consumer processes.

|   |   |   |
|   |   |   |   |EXCHANGE:EMIT Operator
|   |   |   |   |
|   |   |   |   |   |RESTRICT Operator
|   |   |   |   |   |
|   |   |   |   |   |   |SCAN Operator
|   |   |   |   |   |   |  FROM TABLE
|   |   |   |   |   |   |  RB2
|   |   |   |   |   |   |  Table Scan.
|   |   |   |   |   |   |  Forward Scan.
|   |   |   |   |   |   |  Positioning at start of 
                              table.
|   |   |   |   |   |   |  Executed in parallel with
                              a 3-way partition scan.
|   |   |   |   |   |   |  Using I/O Size 2 Kbytes 
                              for data pages.
|   |   |   |   |   |   |  With LRU Buffer Replacement
                              Strategy for data pages.
|   |
|   |   |RESTRICT Operator
|   |   |
|   |   |   |SCAN Operator
|   |   |   |  FROM TABLE
|   |   |   |  RA2
|   |   |   |  Index : RA2_NC1
|   |   |   |  Forward Scan.
|   |   |   |  Positioning by key.
|   |   |   |  Keys are:
|   |   |   |    a3 ASC
|
|  TO TABLE
|  RA2
|  Using I/O Size 2 Kbytes for data pages.

The table RB2, which is being deleted, is scanned and deleted in serial. However, table RA2 was scanned in parallel. The same scenario is true for update or insert statements.