querybuilder
querybuilder copied to clipboard
Performance on insert many
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
@ahmad-moussawi Any chance to review?
@ahmad-moussawi