skip to main content
Developing JDBC Applications : Fine-Tuning JDBC Application Performance : Fetching BigDecimal Objects
 

Fetching BigDecimal Objects

JDBC 1.22 defines getBigDecimal() with a scale parameter. When the JDBC Client fetches a BigDecimal object from a database, it rescales it using the scale specified by the application. This additional processing can downgrade system performance, particularly when large numbers of BigDecimal objects are fetched by your application.
To eliminate this additional rescaling, JDBC 2.0 defined an overloaded version of getBigDecimal, without the scale parameter. This method allows the JDBC Client to return the BigDecimal object with the original precision.