{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/5114","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/5114/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/5114/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/5114/events","html_url":"https://github.com/dotnet/corefx/issues/5114","id":123916452,"node_id":"MDU6SXNzdWUxMjM5MTY0NTI=","number":5114,"title":"SqlBulkCopy class lacks option to specify ORDER BY hint","user":{"login":"dobos","id":5139831,"node_id":"MDQ6VXNlcjUxMzk4MzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5139831?v=4","gravatar_id":"","url":"https://api.github.com/users/dobos","html_url":"https://github.com/dobos","followers_url":"https://api.github.com/users/dobos/followers","following_url":"https://api.github.com/users/dobos/following{/other_user}","gists_url":"https://api.github.com/users/dobos/gists{/gist_id}","starred_url":"https://api.github.com/users/dobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobos/subscriptions","organizations_url":"https://api.github.com/users/dobos/orgs","repos_url":"https://api.github.com/users/dobos/repos","events_url":"https://api.github.com/users/dobos/events{/privacy}","received_events_url":"https://api.github.com/users/dobos/received_events","type":"User","site_admin":false},"labels":[{"id":335854516,"node_id":"MDU6TGFiZWwzMzU4NTQ1MTY=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Data.SqlClient","name":"area-System.Data.SqlClient","color":"d4c5f9","default":false},{"id":145399957,"node_id":"MDU6TGFiZWwxNDUzOTk5NTc=","url":"https://api.github.com/repos/dotnet/corefx/labels/enhancement","name":"enhancement","color":"207de5","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"node_id":"MDk6TWlsZXN0b25lMTMyODA4MA==","number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"node_id":"MDQ6VXNlcjEzMDI4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":1834,"closed_issues":187,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2019-02-19T21:00:19Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2015-12-26T08:22:57Z","updated_at":"2019-02-19T21:11:02Z","closed_at":null,"author_association":"NONE","body":"Bulk insert into a table with PK is significantly faster if input data is in order (no need to write to tempdb first and run a sort). Need to add the ORDER(...) hint to the tdscommand string.\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/465311393","html_url":"https://github.com/dotnet/corefx/issues/5114#issuecomment-465311393","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/5114","id":465311393,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NTMxMTM5Mw==","user":{"login":"jeroen-mostert","id":17575501,"node_id":"MDQ6VXNlcjE3NTc1NTAx","avatar_url":"https://avatars2.githubusercontent.com/u/17575501?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroen-mostert","html_url":"https://github.com/jeroen-mostert","followers_url":"https://api.github.com/users/jeroen-mostert/followers","following_url":"https://api.github.com/users/jeroen-mostert/following{/other_user}","gists_url":"https://api.github.com/users/jeroen-mostert/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroen-mostert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroen-mostert/subscriptions","organizations_url":"https://api.github.com/users/jeroen-mostert/orgs","repos_url":"https://api.github.com/users/jeroen-mostert/repos","events_url":"https://api.github.com/users/jeroen-mostert/events{/privacy}","received_events_url":"https://api.github.com/users/jeroen-mostert/received_events","type":"User","site_admin":false},"created_at":"2019-02-19T21:11:02Z","updated_at":"2019-02-19T21:11:02Z","author_association":"NONE","body":"Splitting this off to its own comment because editing of the previous one got out of hand; that should be stable now. :-)\r\n\r\n> That being said, this proposal does not necessarily conflict with the request to have a `string OrderHint` property that populates the same `ORDER ()` option. It could even be that `OrderHint`, if it has a value, is used as is, else the value is auto-populated as I suggested if `SqlBulkCopyOptions.Ordered` was passed in.\r\n\r\nThe order can't be determined until `.WriteToServer` is called, when we know the `.DestinationTableName` (the weird inconsistency between non-essential options set in the constructor and essential options being set in properties after construction is another peeve of mine -- but I digress). The property `OrderHint` could only be populated after the copy was done (overwriting only on an empty value), which I don't think is worth exposing. You'd end up with an API where it's a really good idea to set the `OrderHint` yourself, unless you don't, but you do use `SqlBulkCopyOptions.Ordered`, when we will set the hint for you, and have mercy on your soul if you didn't already order your data the way you somehow already knew it had to be ordered. It almost starts making more sense to have a dedicated class for discovering the clindex metadata and building the hint for you, but then we're back to something that I'm not sure the framework absolutely needs to have."}}
{"actor":{"display_login":"jeroen-mostert"}}