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

Performance on insert many #548

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mkolumb
Copy link

@mkolumb mkolumb commented Jan 19, 2022

Hello, I noticed some performance issue with insert many on big collection.
It looks like there are few reasons

  • unnecessary cast to list
  • using string operator instead of string builder
  • compilation as .net standard (or maybe another problem with build, insert from collection with 50k rows and 3 columns takes 15 seconds when using nuget 2.3.7 package, around 1.2 seconds when compiled directly for .net core 3.1)

I fixed first two things, but I didn't change target frameworks, I think it would be good to compile sql kata as multiple frameworks, including .net core 3.1, .net 5.0 and .net 6.0

What I changed

  • Add insert many overload
  • Use dictionary in insert clause
  • Fixed sql server compiler test runner (now every test class have their own instance and legacy pagination is used in tests)
  • Improved string build performance

Use dictionary in insert clause
Fixed sql server compiler test runner
Improved string build performance
@mkolumb mkolumb force-pushed the feature/compiler-performance branch from a36151d to 6f19ea8 Compare May 25, 2022 17:48
…erformance

# Conflicts:
#	QueryBuilder.Tests/Infrastructure/TestCompilersContainer.cs
@mkolumb
Copy link
Author

mkolumb commented Jun 22, 2022

@ahmad-moussawi Any chance to review?

@mkolumb
Copy link
Author

mkolumb commented Mar 28, 2023

@ahmad-moussawi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant