I'm developing an ASP.NET app using Entity Framework 6 and Sql Server 2012 and want to optimise the indexes.
EF6 wraps the queries in a sp_execsql call which seems to thwart the Database Engine Tuning Advisor.
I'm capturing all my queries with Sql Query Profiler's "Tuning" template with the following events:
- RPC:Completed
- SP:StmtCompleted
- SQL:BatchCompleted
When running the tuning advisor against this, 99% of the queries are skipped due to "no tables referenced in query"
Am i missing the obvious, or do i need to tell EF not to use sp_execsql?
Thanks
Ben