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 issue #83

Open
nqtien310 opened this issue Oct 3, 2016 · 1 comment
Open

Batch issue #83

nqtien310 opened this issue Oct 3, 2016 · 1 comment

Comments

@nqtien310
Copy link

What's the difference between, I suppose the batch should only make 1 call to the DB but turns out it doesn't

Upsert.batch(connection, table_name) do |upsert|
  #N rows
  upsert.row({}, {})
end

and

upsert = Upsert.new(connection, table_name)
#N rows
upsert.row({}, {})
@pnomolos
Copy link
Collaborator

@nqtien310 There is no functional difference between those two at the time being. If it's possible for them to be bulk-optimized (better than just sending all the SQL commands at once, vs. one at a time) then those improvements will show up in the batch form :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants