Updated on 2024-03-08 GMT+08:00

Performance Issues

processResult is time-consuming

Set loglevel to 3 and enable the JDBC log function. There are two scenarios where the processResult phase is time-consuming:
  1. JDBC waits a long time for the database to return packets.

    Possible cause: If the interval between the FE=> Syncr log and the <=BE ParseComplete log is long, the execution is slow.

    Solution: Analyze the cause of slow SQL execution. For details, see SQL Execution Is Slow with Low Performance and Sometimes Does Not End After a Long Period of Time.

  2. It takes a long time when the result set is too large and all data is loaded at a time.

    Possible cause: View logs. If <=BE DataRow logs appear too many times or there are a large volume of query results returned by select count(*) command, the result set is too large.

    Solution: Set fetchSize to a small value so that data is returned in batches and the client can quickly respond.

    1
    statement.setFetchSize(10);
    

modifyJdbcCall and createParameterizedQuery are time-consuming

Possible cause: If modifyJdbcCall (verifying specification of the passed SQL statements) and createParameterizedQuery (parsing the passed SQL statements into preparedQuery to obtain subqueries consisting of simplequery) take a long time, check whether the SQL statements need to be optimized.

Solution: Check whether the SQL statements can be optimized on the application side..