Closed Kf-MarianBejenari closed 5 years ago
Hello @Kf-MarianBejenari ,
Thank you for reporting, we will look at your request.
Best Regards,
Jonathan
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Entity Framework Classic • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function
Hello @Kf-MarianBejenari ,
We looked at it and unfortunately, we didn't found how to fix it.
Entity Framework
generate those queries but it might also be caused by some code that is not optimized on our side.
After spending some hours on this, we will need to abandon as it looks to be an issue currently too depth to be able to easily fix it.
@JonathanMagnan I am hitting the same problem with a query adding a CROSS APPLY for each navigation property. Could you take a fresh look at this issue or provide your more detailed view of the issue, so I can attempt investigating?
Hello @cosminvlad ,
If I remember correctly, Entity Framework
was generating an expression of around 50,000 lines of LINQ expression. Those lines are generally translated in some simple join but in Effort
, every of those LINQ method was called which become a very huge performance issue.
Description
When a navigation property with filter is used in mapping, EF generates a JOIN for each of the subsequent property mapped.
If such property is at start of the mapping like below
It generates 3 LEFT OUTER JOINS with Book table (one for each property after navigation)
but if we change the order to
It generates only required JOINS
Fiddle or Project
https://dotnetfiddle.net/YJ0uds
Further technical details