Topic
1 reply Latest Post - ‏2012-08-28T08:19:36Z by VNQB_Jean-Francois_Contour
VNQB_Jean-Francois_Contour
10 Posts
ACCEPTED ANSWER

Pinned topic queryTimeoutInSeconds has no effect in static mode with DB2 z/OS ??

‏2012-08-27T16:14:01Z |
In our context :
  • purequery annotated methods
  • static mode
  • DB2 z/OS v9

it seems that the parameter queryTimeoutInSeconds has no effect. It works fine in dynamic mode with z/OS, it works fine in Static mode with DB2 Express. I didn't notice ny problem with any other pureQuery property (maxResultRows for instance).

It's pretty easy to test a long running query with a simple cartesian product (select from myTable, myTable) or worse (select from myTable, myTable, myTable)

I would very appreciate anybody to do a similar test on z/OS. Thanks

Attached is the purequery log pdqLogStaticMode.log
The quey lasts more than 7 seconds (SQL code 0) and should have been stopped (SQL code -952) because the timeout is set to 1 second

pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setQueryTimeout ENTRY [1]pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setQueryTimeout RETURN {0}
pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setMaxRows ENTRY 10
pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setMaxRows RETURN {0}
pdq2012-08-27-10:45:08.348mainDB2StaticData@15d17d7DB2StaticData getPreparedStatement(String, String[, StatementDescriptor, boolean)] input(4), pstmt - Info: String@1b4a74b:99651eda:SELECT COUNT(*) FROM TEST.TQVCTRN, TEST.TQVCTRN String[@1343ed0:String@15356d5:31:1] [StatementDescriptorImpl@364641:methodNameAndParameterTypes: getNbreEnormeDeLignes(), originalSql: null, processedSql: SELECT COUNT(*) FROM TEST.TQVCTRN, TEST.TQVCTRN, sqlStatementType: QUERY, isQuery: true, packageName: DeLaMortSQL, collection: NULLID, consistencyToken: 00000139594af53e, section: 1, id: 1, parameterHandler: null, callHandler: null, rowHandler: com.lcl.pocpdq.DeLaMortSQLImpl$GetNbreEnormeDeLignesRowHandler@69d02b, methodInfoArray: null, parameterMetaData: null, resultSetMetaData: [[4], 10, [0], 0], columnNames: 1], statementAttributes: java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT, java.sql.ResultSet.CONCUR_READ_ONLY, java.sql.ResultSet.TYPE_FORWARD_ONLY, allowStaticRowsetCursors=DISALLOW_STATIC_ROWSET_CURSORS Boolean@13e754f:4cf:true $Proxy1@187c55c:59a34:com.ibm.db2.jcc.am.pn@59a34
pdq2012-08-27-10:45:08.348mainProxiedDB2StatementInvocationHandler@18166e5invoke: executeQuery ENTRY null
pdq2012-08-27-*10:45:16.739*mainProxiedDB2StatementInvocationHandler@18166e5invoke: executeQuery RETURN {0}
pdq2012-08-27-10:45:16.739mainDB2StaticData@15d17d7queryFirst RETURN {0}

the quey lasts more than 7 seconds and should have been stopped (SQL code -952) because the timeout is set to 1 second
Updated on 2012-08-28T08:19:36Z at 2012-08-28T08:19:36Z by VNQB_Jean-Francois_Contour
  • VNQB_Jean-Francois_Contour
    10 Posts
    ACCEPTED ANSWER

    Re: queryTimeoutInSeconds has no effect in static mode with DB2 z/OS ??

    ‏2012-08-28T08:19:36Z  in response to VNQB_Jean-Francois_Contour
    ...formating issues in my last post. Here is an extract from the pureQuery log and the driver log that contains 2 tests : first in static mode, then in dynamic mode (-952)

    pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setQueryTimeout ENTRY [1]
    pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setQueryTimeout RETURN {0}
    pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setMaxRows ENTRY 10
    pdq2012-08-27-10:45:08.333mainProxiedDB2StatementInvocationHandler@18166e5invoke: setMaxRows RETURN {0}
    pdq2012-08-27-10:45:08.348mainDB2StaticData@15d17d7DB2StaticData getPreparedStatement(String, String[, StatementDescriptor, boolean)] input(4), pstmt - Info: String@1b4a74b:99651eda:SELECT COUNT(*) FROM TEST.TQVCTRN, TEST.TQVCTRN String[@1343ed0:String@15356d5:31:1] [StatementDescriptorImpl@364641:methodNameAndParameterTypes: getNbreEnormeDeLignes(), originalSql: null, processedSql: SELECT COUNT(*) FROM TEST.TQVCTRN, TEST.TQVCTRN, sqlStatementType: QUERY, isQuery: true, packageName: DeLaMortSQL, collection: NULLID, consistencyToken: 00000139594af53e, section: 1, id: 1, parameterHandler: null, callHandler: null, rowHandler: com.lcl.pocpdq.DeLaMortSQLImpl$GetNbreEnormeDeLignesRowHandler@69d02b, methodInfoArray: null, parameterMetaData: null, resultSetMetaData: [[4], 10, [0], 0], columnNames: 1], statementAttributes: java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT, java.sql.ResultSet.CONCUR_READ_ONLY, java.sql.ResultSet.TYPE_FORWARD_ONLY, allowStaticRowsetCursors=DISALLOW_STATIC_ROWSET_CURSORS Boolean@13e754f:4cf:true $Proxy1@187c55c:59a34:com.ibm.db2.jcc.am.pn@59a34
    pdq2012-08-27-10:45:08.348mainProxiedDB2StatementInvocationHandler@18166e5invoke: executeQuery ENTRY null
    pdq2012-08-27-10:45:16.739mainProxiedDB2StatementInvocationHandler@18166e5invoke: executeQuery RETURN {0}
    pdq2012-08-27-10:45:16.739mainDB2StaticData@15d17d7queryFirst RETURN {0}