Performance optimizations when bulk loading large amounts of timestamps#2194
Merged
lilgreenbird merged 4 commits intomicrosoft:mainfrom Nov 2, 2023
Merged
Performance optimizations when bulk loading large amounts of timestamps#2194lilgreenbird merged 4 commits intomicrosoft:mainfrom
lilgreenbird merged 4 commits intomicrosoft:mainfrom
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree
Skickat från min iPhone
… 15 aug. 2023 kl. 22:33 skrev microsoft-github-policy-service[bot] ***@***.***>:
@microsoft-github-policy-service agree
|
Contributor
|
Thank you for the PR @hannes92. We'll review it when we're able to and get back to you with our next steps. |
Contributor
|
could you please add a test which covers the scenario |
Contributor
Author
|
Added a test case, I lowered the mount of rows inserted to 10000 to not slow down the test suite |
Contributor
|
Hi @hannes92, The PR passes our internal testing, we'll now be reviewing it. |
| public class BulkCopyTimestampTest extends AbstractTest { | ||
|
|
||
| public static final int COLUMN_COUNT = 16; | ||
| public static final int ROW_COUNT = 10000; |
Contributor
There was a problem hiding this comment.
it's not really necessary to do this that many times, just make sure this is run at last once cover the newly added code
lilgreenbird
suggested changes
Sep 22, 2023
Contributor
lilgreenbird
left a comment
There was a problem hiding this comment.
please make changes as per comments
Contributor
Contributor
|
After making the newly requested changes, LGTM. |
Jeffery-Wasty
approved these changes
Oct 19, 2023
tkyc
approved these changes
Oct 25, 2023
lilgreenbird
approved these changes
Nov 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While writing software to sync a couple of hundred million rows from another rdbms to sql server via the BulkCopy API, I discovered a disproportioned amount of time was spent serializing Timestamp objects to then deserialize them into Timestamp objects once again.
My fix for this is to be able to accept Timestamp objects directly (which should cover the majority of objects passed) and only serialize them once when passing the date values to the TDSWriter.
I have attached an example to show the difference while importing about 600k rows with 16 columns with dates only.
