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

[FEATURE REQUEST]Add order Hints for Bulk Copy operations #1481

Open
luxu1-ms opened this issue Dec 10, 2020 · 7 comments · May be fixed by #2472
Open

[FEATURE REQUEST]Add order Hints for Bulk Copy operations #1481

luxu1-ms opened this issue Dec 10, 2020 · 7 comments · May be fixed by #2472
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.

Comments

@luxu1-ms
Copy link

luxu1-ms commented Dec 10, 2020

Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it

Can you add support for order hints for bulk copy operations? I am going to add order hints for spark-mssql-connector but there is no implementation of order hints for SQLServerBulkCopy.class, SQLServerBulkCopyOptions.class

Describe the preferred solution

Describe alternatives you've considered

Additional context

Reference Documentations/Specifications

BULK INSERT allow to specify if data already has a specific order so that Azure SQL / SQL Server can avoid sorting it again if inserting data into a clustered index.

ORDER ( { column [ ASC | DESC ] } [ ,... n ] ) Specifies how the data in the data file is sorted. Bulk import performance is improved if the data being imported is sorted according to the clustered index on the table, if any. If the data file is sorted in a different order, that is other than the order of a clustered index key or if there is no clustered index on the table, the ORDER clause is ignored. The column names supplied must be valid column names in the destination table. By default, the bulk insert operation assumes the data file is unordered. For optimized bulk import, SQL Server also validates that the imported data is sorted.

https://docs.microsoft.com/en-us/sql/connect/ado-net/sql/bulk-copy-order-hints?view=sql-server-ver15

Reference Implementation

@luxu1-ms luxu1-ms added the Enhancement An enhancement to the driver. Lower priority than bugs. label Dec 10, 2020
@ulvii
Copy link
Contributor

ulvii commented Dec 10, 2020

Hi @luxu1-ms ,
Thank you for the suggestion. The team will take a look into this.

@luxu1-ms
Copy link
Author

Hi, any update on this issue

@lilgreenbird
Copy link
Contributor

hi @luxu1-ms
This issue is in our backlog. This will be triaged when we plan for the next semester.

Thanks.

@shivsood
Copy link

Any updates on this?

@lilgreenbird
Copy link
Contributor

hi @shivsood

This issue is still in our backlog. It didn't make the cut as we have to prioritize bug fixes and other features that are in higher demand. Please feel free to fill out our survey for features you would like to see in the driver we do look at the results when we do semester planning.

@lilgreenbird lilgreenbird added this to the Long Term Goals milestone Nov 29, 2022
@Jeffery-Wasty Jeffery-Wasty removed this from the Long Term Goals milestone Sep 27, 2023
@siggemannen
Copy link

Would patches for this be accepted? it looks to be literally a couple of rows of changes since it's all in the query being send to sql server + new orderoption parameter to bulk copy options

@Jeffery-Wasty
Copy link
Contributor

Yes, we accept external PRs. Feel free to submit something, and we'll take a look.

mobilebilly added a commit to mobilebilly/mssql-jdbc that referenced this issue Jul 7, 2024
@Jeffery-Wasty Jeffery-Wasty linked a pull request Jul 8, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this to To be triaged in MSSQL JDBC Aug 28, 2024
@Jeffery-Wasty Jeffery-Wasty moved this from To be triaged to Backlog in MSSQL JDBC Aug 28, 2024
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
Status: Backlog
Development

Successfully merging a pull request may close this issue.

6 participants