Batch Insert/ Batch Select
Hi , Thanks for creating the only go lib for Sybase. Just wanted to check if we have the feature of doing batch select and batch insert . For Ex in Java I can control the fetch size while doing select which can return million records: DataSource iq; Connection iqConnection = iq.getConnection(); PreparedStatement stmnt = iqConnection.prepareStatement(selectQuery); stmnt.setFetchDirection(ResultSet.FETCH_FORWARD); stmnt.setFetchSize(batchSize); // 10000 ResultSet result = stmnt.executeQuery()
Similarly for doing batch insert.
Is this something which is already present(I couldn't find it) or is it something in your road map?
Many Thanks
Hi,
The fetch size does not provide such a huge performance improvement in my experience.
However batching the inserts does indeed. I need to provide an API for this a sgo's database/sql interface does not.
Ideally I should also parse simple insert statements and convert them to bulk inserts. However it requires reverse engeneering the bulk insert serialization method and parsing the sql statements so it's quite harder than just batching.
I'll work on simple inserts batching and will try to deliver this semester. Good bulk insert support however is a bit time consuming for me so I would need help.
Please see this issue on the golang repo for tracking