Using the BULK feature in embedded SQL with the INSERT,
SELECT and FETCH statements can reduce the number of SQLCore calls.
Even though it uses a large
internal buffer to process queries,
ALLBASE/SQL makes a separate call to SQLCore for each row in a simple SELECT
or FETCH. If the BULK option is used, ALLBASE/SQL needs a smaller number of
calls to SQLCore, thus reducing overhead. Since BULK operations can be
2 to 10 times faster than their non-BULK counterparts, you should use
them wherever possible. Note that you cannot employ
UPDATE WHERE CURRENT or DELETE WHERE CURRENT statements
when using BULK operations.
When using the BULK option, declare an array as close as possible to 12K bytes
or a multiple of 12K bytes, since this is the size of SQLCore's tuple
buffer.