Feature request: SQL preparedStatement batch endpoint

Poster Content
nk4um Administrator
Posts: 607
February 21, 2016 18:07
Like · Post Reply
nk4um User
Posts: 90
February 19, 2016 09:45

Thanks for considering the idea.

My project is on the way, but not as fast as I had hoped. Especially the web gui takes lots of time, as I decided to use as less libraries as possible and code the rest from scratch. I hope to set up a demonstration website end of next month, I will let you know.

Cheers, Stefan

Like · Post Reply
nk4um Administrator
Posts: 607
February 18, 2016 21:25

Hi Stefan, that does indeed look like a good optimisation. We'll just need to check if this is possible with JDBC.

Hope your project is going well? Tony

Like · Post Reply
nk4um User
Posts: 90
February 18, 2016 20:32Feature request: SQL preparedStatement batch endpoint

Hello,

while updating some records in a sqlite DB I compared the active:sqlBatch endpoint from the module urn.org.netkernel.mod.db with the batch execution of a Java preparedStatement. The active:sqlBatch takes already formated SQL strings while the preparedStatement takes one SQL string with placeholders and builds the batch from the delivered parameters.

For 1000 UPDATES the preparedStatement took 50ms, the active:sqlBatch needed 90ms, that's 80% longer.

The existing active:sqlPSUpdate allows only one record to be sent, it has no batch functionality (unless I miss something).

So my question is: Would it make sense to add a "active:sqlPreparedStatementBatch" to the module? This would give the possibility to squeeze every millisecond out of the database!

Thanks, Stefan

Like · Post Reply