none
Query execution plan in EF RRS feed

  • Question

  • Hi,

    Does entity framework do something like saving a query execution plan for database? By query exection plan i mean the plan that is used by database to execute a query.

    Wednesday, June 27, 2012 2:19 PM

Answers

  • Hi,

    See http://msdn.microsoft.com/en-us/data/hh949853.aspx and in particular 3.2 (note also this is for EF 5). If it doesn't help and if you have a particular issue, it's perhaps best to tell us about the source issue so that we better understand the goal of your question... (if you meant really the database server side plan, this one is internal to the db, EF doesn't do known anything that and the DB doesn't know about EF but just works on whatever SQL statements are submitted regardless of how they where produced).


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".



    Wednesday, June 27, 2012 2:53 PM

All replies

  • Hi,

    See http://msdn.microsoft.com/en-us/data/hh949853.aspx and in particular 3.2 (note also this is for EF 5). If it doesn't help and if you have a particular issue, it's perhaps best to tell us about the source issue so that we better understand the goal of your question... (if you meant really the database server side plan, this one is internal to the db, EF doesn't do known anything that and the DB doesn't know about EF but just works on whatever SQL statements are submitted regardless of how they where produced).


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".



    Wednesday, June 27, 2012 2:53 PM
  • I don't think there is anything built-in that allow you to capture the db-side query execution plan, but there are third-party tools that can do that. One such tool is my query profiler, see http://huagati.blogspot.com/2010/06/entity-framework-support-in-huagati.html for a description of how it works and what information it captures for you.

     

       Cool tools for Linq-to-SQL and Entity Framework 4:
     huagati.com/dbmltools - Visual Studio add-in with loads of new features for the Entity Framework and Linq-to-SQL designers
     huagati.com/L2SProfiler - Runtime SQL query profiler for Linq-to-SQL and Entity Framework v4

    Thursday, June 28, 2012 1:33 AM