BackPrevious Page Next PageNext

Configuring JdbcDriversConfig.properties

Limiting the size of the fetch data buffer

Specifying where to implement the maximum query run time and number of records

Canceling running query

You can configure the file JdbcDriversConfig.properties in the <install_root>\bin directory for better performance.

Limiting the size of the fetch data buffer

If you are using a database which supports the JDBC method Statement.setFetchSize(), you can request the database retrieve a specified number of rows in each read instead of all rows which minimizes memory usage which can improve performance. It can also avoid Java heap out of memory errors when doing large queries. JReport provides a property setFetchSize in the JdbcDriversConfig.properties file for you to do this.

The following is an example of setting the setFetchSize property in the JdbcDriversConfig.properties file and detailed description of each property:

DriverName_D1 = MySQL-AB JDBC Driver
Vendor_D1 = MySql.com
Version_D1 = 3.0.8-stable ( $Date: 2003/05/19 00:57:19 $, $Revision: 1.27.2.18 $ )
setFetchSize_D1 = 5000

Specifying where to implement the maximum query run time and number of records

In the JdbcDriversConfig.properties file, you can also specify where the properties, Maximum Rows and Maximum Duration will be implemented, on JReport side or on the database side. For details about usage of these two properties, see Limiting the query run time and number of records in the Queries chapter of the JReport Designer User's Guide.

The following is an example of setting the two properties:

DriverName_D2 = Oracle JDBC driver
Vendor_D2 = Oracle
Version_D2 = 9.2.0.3.0
supportMaxRowPushDown_D2 = true
supportMaxDurPushDown_D2 = true

Canceling running query

If your JDBC driver support the Cancel Running Query feature and you want JReport to cancel the running query used by a report in the database when you cancel the running task of the report, for example, when you click the Cancel button on the report processing page of Page Report Studio, or when you choose to stop a report running in background mode, configure the file JdbcDriversConfig.properties as follows:

  1. Add the JDBC driver you use into JdbcDriversConfig.properties if it is not listed there.
  2. In the file JdbcDriversConfig.properties there is a line:

    #supportCancelQueryStatement_D5=true

    Remove the sign # and use your driver number instead of D5 to activate the feature.

  3. Restart your JReport Server, then the next time, when you choose to cancel a running task, the query used by the report will also be cancelled in the database, provided that the DBMS supports this action.

Notes:

BackPrevious Page Next PageNext