Closed SteffenMangold closed 5 years ago
Nice finding! I used the ToSql
method because it gave me the parameter values, not just a raw expression without any details. But it seems _query.Expression.ToString()
gives the same result and contains the parameter values as well.
Nice finding! I used the
ToSql
method because it gave me the parameter values, not just a raw expression without any details. But it seems_query.Expression.ToString()
gives the same result and contains the parameter values as well.
I think you have to reopen it. There is a problem with some parameter values. The complete problem is descript here: https://petemontgomery.wordpress.com/2008/08/07/caching-the-results-of-linq-queries/
There is also a logic to solve this. But it needs some more implementation.
I also created a question for the EF team. Maybe there is another solution. https://github.com/aspnet/EntityFrameworkCore/issues/14230
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related problems.
Summary of the issue
I have a more general question.
The
ToSql
function you are using is very very very slow. It brings an extreme high CPU workload to a heavy cache using service.Why you don't use the
_query.Expression.ToString()
function as base to build the hash value for an IQueryable? I think it gives us to exact the same result but at much higher speed? Is there some point I'm missing?