0

I'm calling a SQL stored procedure using SimpleJdbcCall and it's working perfectly - except that the performance is too slow.

To improve that I've tried to batch the calls so they get executed in one go - and I cannot find a way to do that.

SimpleJdbcCall doesn't seem to be batchable.

So I found jdbcTemplate.batchUpdate(

I built the parameters both asList<Object[]> format or using a BatchPreparedStatementSetter either way I see the same error:

Incorrect syntax near '@p0'.

Here is the SQL statement I'm trying to batch:

call PortfolioCacheStore ?,?,?,?,?,?,?,?,?,?,?,?,?

I've tried that using both call and exec, and with and without brackets:

call PortfolioCacheStore(?,?,?,?,?,?,?,?,?,?,?,?,?)

etc

Either way I get the above error or something very similar.

If I take the query it's constructing and run it in a SQL client it works:

exec PortfolioCacheStore 'G','LL','U','B',0,'2021-09-03','2022-01-19',5,'D','FO.tgz',0,'e-local','Arg'

Does anyone know what is wrong with what I'm doing and/or how I can batch a sequence of stored procedure calls into Sybase from JDBC please?

Tim B
  • 40,716
  • 16
  • 83
  • 128
  • Which Sybase product are you using? Please tag your question with that product. – Mark Rotteveel Oct 01 '21 at 10:32
  • Adaptive Server Enterprise/15.7/EBF 25127 SMP SP136 /P/x86_64/Enterprise Linux/ase157sp136x/3955/64-bit/FBO/Mon Oct 19 19:12:00 2015 – Tim B Oct 01 '21 at 14:32
  • I've now tried stripping out all the JDBCTemplate stuff and using raw PreparedStatement - to get the exact same error! – Tim B Oct 01 '21 at 14:33
  • That would suggest the driver itself does some kind of translation, which somehow isn't valid. – Mark Rotteveel Oct 01 '21 at 14:51

0 Answers0