Forum Discussion

Koopman_Interna's avatar
Koopman_Interna
Contributor
13 years ago

Performance multiple JDBC requests

When I run multiple small JDBC requests as separate teststeps, say 30 in a row to retrieve 1 record each in 30 different tables, I see the following strange behaviour:
Running 1 teststep manually shows in the Request Log of the JBDC teststep it takes about 16ms. This is pretty consistent, although sometimes 0ms is reported or 31ms. But no intermediate values.
When I run the same requests in a combined Run step, the requests all take about 250ms each.

Where is this overhead coming from? I would like it if the 30 fetchrequests would take 30 x 16ms instead of 30 x 250ms !
(I am running 100 tests from an Excel sheet that each run the 30 JDBC requests before invoking one soap request, so the JDBC requests take about 100 x 30 x 250ms = 750s)

I tested on a much faster PC, no improvement. I use the IBM DB/2 on iSeries JDBC driver (jt400.jar).
The performance is the same for 3.6.1 and 4.0.0.

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    the reason for this difference is that the time reported for single executions is only the time for the actual JDBC request; when running the TestCase the time includes the overhead of teststep-related logic, assertions, etc.

    regards,

    /Ole
    eviware.com
  • Sorry, but the assertions are taking 1 or 2 milliseconds, not 230 milliseconds.
    Is the overhead maybe in setting up and tearing down the JDBC connection for every teststep?
    Is there a way to set up the connection in the set-up script and tearing it down afterwards, instead of setting it up for every JDBC request?

    It would be great if there was a way to maintainthe JDBC connection at testcase level and then specifying at teststep level that the testcase connection should be used.

    I have a lot of tests comparing 2 databases by looping through them and comparing them with scripts.
  • This gets worse and worse in my daily testing.
    JDBC calls take up 80 to 90 % of the testing time, and it seems not needed if the connection was not closed every time.

    Using a soap service to do the same stuff as the direct JDBC statement is checking is way faster.

    Any news on this?