querybuilder icon indicating copy to clipboard operation
querybuilder copied to clipboard

Performance on insert many

Open mkolumb opened this issue 2 years ago • 2 comments

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

mkolumb avatar Jan 19 '22 03:01 mkolumb

@ahmad-moussawi Any chance to review?

mkolumb avatar Jun 22 '22 00:06 mkolumb

@ahmad-moussawi

mkolumb avatar Mar 28 '23 19:03 mkolumb