In OceanBase Connector/J V2.2.7, the performance of SEND PIECE, COM_STMT_PREPARE_EXECUTE, and PreparedStatement.setBytes in Oracle mode is enhanced, and the restrictions on Statement FetchSize and the conditions for using useCursorFetch to retrieve the result set are adjusted.
Main feature changes in this version are as follows:
In Oracle mode, SEND PIECE is disabled by default. To enable SEND PIECE, you must set
useServerPrepStmts=true and usePieceData=true. For more information, see COM_STMT_SEND_PIECE_DATA.In Oracle mode, COM_STMT_PREPARE_EXECUTE supports batch execution. For more information, see COM_STMT_PREPARE_EXECUTE.
In Oracle mode, the PreparedStatement.setBytes performance is optimized, and the time consumed for processing 32 KB of data is reduced from 60 ms to 15 ms. For more information, see LOB data interface.
The restrictions on Statement FetchSize are adjusted.
Statement FetchSize cannot be set to a negative number in Oracle mode. The default value is 10, which is the same as that in the native Oracle Java Database Connectivity (JDBC) driver.
In MySQL mode, Statement FetchSize cannot be set to any negative value except that of
Integer.MIN_VALUE. The default value is 0, which is the same as that in the native MySQL JDBC driver.
For more information, see FetchSize.
The conditions for using useCursorFetch to retrieve the result set are adjusted.
In Oracle mode, when
useServerPrepStmtsis enabled, regardless of whether useCursorFetch is enabled, a cursor is used to retrieve data forSELECTqueries.In MySQL mode, when
useServerPrepStmtsis enabled, if useCursorFetch is enabled (useServerPrepStmts=true), the result set scroll type isTYPE_FORWARD_ONLY, the result set concurrency type isrecur_read_only, and FetchSize is greater than 0, a cursor is used to retrieve data forSELECTqueries.
For more information, see Result set overview.