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

Enable useBulkCopyForBatchInsert for other database types (not only Azure DW) #1443

Closed
skluyskens opened this issue Oct 7, 2020 · 6 comments
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.

Comments

@skluyskens
Copy link

This is about extending #331 to other database types.
I already tried this with a simple example for an on-premise SQL Server Installation and I managed to get it working (by forcing the isAzureDW property to true).

This would allow this feature to be used much more often. It would also provide a workaround for #1072.

@skluyskens skluyskens added the Enhancement An enhancement to the driver. Lower priority than bugs. label Oct 7, 2020
@peterbae
Copy link
Contributor

peterbae commented Oct 7, 2020

This item is in our backlog, but it's not as high priority because Azure DW is the database type that benefits the most from this improvement due to the Azure server delay. By setting isAzureDW to true, the batch insert query might work for simple cases but extending this property officially to other databases is not trivial due to different syntaxes accepted by each database. Which database types are you looking to apply this property for?

@skluyskens
Copy link
Author

Initially we would like to use it for SQL Server on Windows. In the longer run SQL Server on Azure and maybe on Linux would be nice too.
I understand that SQL Server might support many more syntaxes, but I'm ok with only accepting a subset of the supported syntaxes, as long as it's correctly documented. Only support INSERT INTO (, ,) VALUES (?, ?, ?) e.g. is totally fine. With the restriction that all column values should be parameterized, there are not that many options either as far as I know (maybe only options are quoted and non quoted table/column names).

@peterbae
Copy link
Contributor

peterbae commented Oct 8, 2020

Thanks. The team will look into including this feature in the next production release.

@ulvii
Copy link
Contributor

ulvii commented Nov 5, 2020

Hi @skluyskens ,
Could you give us numbers to understand the performance difference you are seeing when enabling useBulkCopyForBatchInsert against on-premise SQL Server?

@skluyskens
Copy link
Author

Hi @ulvii,

I don't have test results for our application, but in .NET, for other applications I think we easily got 5 times better performance. https://stackoverflow.com/questions/40471004/can-i-get-bulk-insert-like-speeds-when-inserting-from-java-into-sql-server is talking about a factor 10 even.

@ulvii
Copy link
Contributor

ulvii commented Nov 27, 2020

#1465 merged.

@ulvii ulvii closed this as completed Nov 27, 2020
@skluyskens skluyskens changed the title Enable isBulkCopyForInsert for other database types (not only Azure DW) Enable useBulkCopyForBatchInsert for other database types (not only Azure DW) Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.
Projects
None yet
Development

No branches or pull requests

3 participants