Updated on 2025-09-04 GMT+08:00

Typical Issues

  1. Symptom: Customers using the Spring framework have set the fetchsize parameter in the connection string, but OutOfMemoryError is reported during a batch query.

    Cause: Transactions are not started prior to the batch query. Generally, connection transactions are managed by the Spring framework. However, if transactions are not started, the database will return all data to JDBC in one go.

    Solution: Check the service code and be sure to start transactions before executing batch queries.

  2. Symptom: The fetchsize parameter has been set in the connection string, but OutOfMemoryError is reported during a batch query.

    Cause: Other call points in the application code consume substantial memory. In this situation, JDBC may encounter OutOfMemoryError when it attempts to read only a small amount of data.

    Solution: Use JDK to check memory usage and determine whether the memory overflow is caused by table data.

  3. Symptom: The table query speed is fast with gsql but slow with JDBC.

    Cause: The fetchsize parameter has been set to a small value in the connection string. This results in a high number of packet interactions between Kernel and the result set, leading to performance degradation.

    Solution: Before querying data, determine whether to start transactions based on the table size or call the prepareStatement.setFetchSize() method to adjust the number of rows to be returned by the database each time. If this number is set to 0, all query results will be returned in one go.