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

The efficiency of 'insertBatch' function #368

Closed
iMyth opened this issue Jan 16, 2017 · 1 comment
Closed

The efficiency of 'insertBatch' function #368

iMyth opened this issue Jan 16, 2017 · 1 comment

Comments

@iMyth
Copy link

iMyth commented Jan 16, 2017

Hi there,

I have a concern about the efficiency of 'insertBatch'. Would it be better to use 'insert into xx select xx union select xx ' instead of loop when having small data?
well...exclude duplicate rows

thx & kind rgds

@lonnieezell
Copy link
Member

Possibly. Care to create some benchmarks and test it?

My biggest concern would be that it works for all of the database engines that CI3 currently supports. Aside from that, if there's a boost for small datasets but it slows down on larger datasets, we'd have to do a bunch of testing on all of those platforms to find where the happy medium is across all of them.

While I wasn't involved in writing the insertBatch query, I'm guessing those elements played a big part in it.

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