Logging Entity Framework Queries to Look for Perf Improvement Opportunities
Posted by: Julia Lerman Blog - Dont Be Iffy...,
on 16 Feb 2009 |
View original | Bookmarked: 0 time(s)
One of the big questions people have about Entity Framework's dynamically generated
queries is "what does the store query look like?", immediately followed by "is that
store query acceptable"?
There are a few ways to see what the store generated queries look like. One is to
use ObjectQuery.ToTraceString.
It's possible to use this method with LINQ to Entities queries as well, because
you can cast a L2E query to an ObjectQuery. The other way to see the generated store
query is good old SqlProfiler,...