You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has caught my attention that the use of the OPENJSON function is causing performance regressions in EF8, as reported in dotnet/efcore#32394. This seems to be caused by the opaque nature of the function to the query engine, which could result in suboptimal execution plans.
QueryableValues currently depends on both OPENJSON and XML methods for functionality, and thus, it is impacted to some degree by these issues.
Here are some potential solutions to address this problem:
For large collections, project the deserialized values to a temp table and use the temp table instead. This should enable statistics, which in turn should generate optimal execution plans. However, it may cause execution plan re-compilations and result in higher latency.
For small collections, avoid the use of deserialization functions and instead switch to a multi-parameter approach. This approach should generate optimal execution plans and maintain low latency.
These two approaches aim to provide the query engine with sufficient information to generate optimal execution plans, which is a priority. Consequently, this behavior should be enabled by default, with an option for users to opt out if desired.
The text was updated successfully, but these errors were encountered:
Just an update on this: Yes, I've invested a lot of time working on this with good results, but I decided to pause to see how the EF team would address it. It seems clear now that they won't be providing the level of integration I've developed to make this work well with SQL Server. That said, if I release this, it will likely be under a different license model. Unfortunately, it’s not sustainable for me to continue putting this level of effort out there completely for free.
It has caught my attention that the use of the
OPENJSON
function is causing performance regressions in EF8, as reported in dotnet/efcore#32394. This seems to be caused by the opaque nature of the function to the query engine, which could result in suboptimal execution plans.QueryableValues currently depends on both
OPENJSON
and XML methods for functionality, and thus, it is impacted to some degree by these issues.Here are some potential solutions to address this problem:
These two approaches aim to provide the query engine with sufficient information to generate optimal execution plans, which is a priority. Consequently, this behavior should be enabled by default, with an option for users to opt out if desired.
The text was updated successfully, but these errors were encountered: