The sqlAccessColumnsAsBytes build
descriptor option specifies whether column values from a DB2 database
are copied directly as bytes into an SQL record rather than being
used to construct Java objects.
Setting the option to
YES provides a performance enhancement in generated Java code. However,
that enhancement is available only in the following case:
- The DB2 JDBC driver supports byte access APIs. At this writing,
the only conforming driver is the JCC Type 2 zos driver for JCC version
3.62/4.12.
- The column values are of a decimal, character, or graphic type,
including char, varchar, longvarchar, graphic, vargraphic, and long
vargraphic.
- The fieldsMatchColumns property on the
SQL record is set to YES. For details on the property, see "SQLRecord
stereotype."
- The database encoding has the same value as the Java Runtime Environment file.encoding property.
The greatest performance benefit is for an SQL record that is based
on a part with level numbers. The numbers mean that the record is
structured, with field lengths that are fixed at generation time.
However, a performance benefit is available for non-structured SQL
records.
Values
- NO (the default)
- The column values are used to construct Java objects and are not
copied as bytes.
- YES
- The column values are copied as bytes, if possible.