Configuring JdbcDriversConfig.properties
You can configure the file JdbcDriversConfig.properties in the <install_root>\bin
directory for better performance.
Below is a list of the sections covered in this topic:
- Limiting the Size of the Fetch Data Buffer
- Specifying Where to Implement the Maximum Query Run Time and Number of Records
- Canceling Running Query
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. Logi 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_[Name]
Database driver name that should be used to establish a connection. You can use connection.getMetaData().getDriverName() to obtain the value. - Vendor_[Name]
The vendor of current JDBC driver. It is a string value. - Version_[Name]
The version of current JDBC driver. You can use connection.getMetaData().getDriverVersion() to obtain the value. The entire string must match completely. - setFetchSize_[Name]
The number of rows retrieved in each buffer from the database. It is an Integer value that should be larger than 0 and less than or equal to getMaxRows(). The default value is different according to the driver in use. You can refer to your own database driver specification. - _[Name]
It is a user-defined name used to mark a group of driver settings different from the other groups.
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 Logi 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 section of the Logi JReport Designer User's Guide.
The following is an example of setting the two properties:
|
- DriverName_[Name]
Database driver name that should be used to establish a connection. You can use connection.getMetaData().getDriverName() to obtain the value. - Vendor_[Name]
The vendor of current JDBC driver. It is a string value. - Version_[Name]
The version of current JDBC driver. You can use connection.getMetaData().getDriverVersion() to obtain the value. - SupportMaxRowPushDown_[Name]
Specifies where the property Maximum Rows will be implemented, on Logi JReport side or on the database side. By default, it is set to true, which means the property will take effect on the database side. If it is set to false, the property will take effect on Logi JReport side. - SupportMaxDurPushDown_[Name]
Specifies where the property Maximum Duration will be implemented, on Logi JReport side or on the database side. By default, it is set to true, which means the property will take effect on the database side. If it is set to false, the property will take effect on Logi JReport side. - _[Name]
It is a user-defined name used to mark a group of driver settings different from the other groups.
Canceling Running Query
If your JDBC driver support the Cancel Running Query feature and you want Logi 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 select 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:
- Add the JDBC driver you use into JdbcDriversConfig.properties if it is not listed there.
- 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.
Restart your Logi 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.
- After you modified the JdbcDriversConfig.properties file, you need start the server to load the changes.
- The Version information must match 100% with the version returned by the JDBC Driver, if not a full match the settings will be ignored without warning.
- If there is more than one group with the same group marking name, the last group will be adopted.
- If the sign # is seen before "DriverName" of a group, or if setFetchSize is given a negative value, the whole group will be disabled.