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

Set max batch size for SQL Server #21704

Merged
1 commit merged into from
Jul 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public SqlServerModificationCommandBatch(
throw new ArgumentOutOfRangeException(nameof(maxBatchSize), RelationalStrings.InvalidMaxBatchSize);
}

_maxBatchSize = Math.Min(maxBatchSize ?? int.MaxValue, MaxRowCount);
_maxBatchSize = Math.Min(maxBatchSize ?? 42, MaxRowCount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndriySvyryd how are you?

Just out of curiosity, any specific reason for reaching number 42?

it's just curiosity.

Copy link
Contributor

@ralmsdeveloper ralmsdeveloper Jul 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, now I looked at issue #9270

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, any specific reason for reaching number 42?

Only because it's the answer to the Ultimate Question of Life, the Universe, and Everything and it has better perf in common scenarios than the implicit default of ~2100

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank u, living and learning!

}

/// <summary>
Expand Down