Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Insert/ Batch Select #14

Open
neokrishna opened this issue Jan 14, 2020 · 2 comments
Open

Batch Insert/ Batch Select #14

neokrishna opened this issue Jan 14, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@neokrishna
Copy link

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

@thda
Copy link
Owner

thda commented Jan 18, 2020

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.

@thda thda added enhancement New feature or request help wanted Extra attention is needed labels Jan 18, 2020
@thda
Copy link
Owner

thda commented Jul 2, 2020

Please see this issue on the golang repo for tracking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants