Restrictions on using buffered inserts
The following restrictions apply to buffered inserts:
- For an application to take advantage of the buffered inserts,
one of the following must be true:
- The application must either be prepared through PREP or bound with the BIND command and the INSERT BUF option is specified.
- The application must be bound using the BIND or the PREP API with the SQL_INSERT_BUF option.
- If the INSERT statement with VALUES clause includes long fields or LOBS in the explicit or implicit column list, the INSERT BUF option is ignored for that statement and a normal insert section is done, not a buffered insert. This is not an error condition, and no error or warning message is issued.
- INSERT with fullselect is not affected by INSERT BUF. A buffered insert does not improve the performance of this type of INSERT.
- Buffered inserts can be used only in applications, and not through CLP-issued inserts, as these are done through the EXECUTE IMMEDIATE statement.
- When using buffered inserts in Db2 11.5.7 and later, specifying the REOPT ALWAYS option in a SQL statement causes the INSERT BUF option to be ignored for that statement. As a result, a normal INSERT operation is done, not a buffered insert. This is not an error condition, and no error or warning message is issued.
The application can then be run from any supported client platform.