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?