-
-
Save OksanaH/4ade222b230d59b09ccb7c6e8e3e45e2 to your computer and use it in GitHub Desktop.
This file contains 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
private static async Task CopySlowly() | |
{ | |
Stopwatch sw = new Stopwatch(); | |
sw.Start(); | |
var request = new ScanRequest | |
{ | |
TableName = sourceTableName | |
}; | |
var result = await client.ScanAsync(request, default); | |
foreach (var item in result.Items) | |
{ | |
var putItemRequest = new PutItemRequest | |
{ | |
TableName = destinationTableNameSlow, | |
Item = item | |
}; | |
await client.PutItemAsync(putItemRequest, default); | |
} | |
sw.Stop(); | |
Console.Write($"Copy slow - {sw.ElapsedMilliseconds} milliseconds elapsed"); | |
Console.ReadLine(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment