My feedback

  1. 192 votes
    Sign in
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    BG commented  · 

    There are many scenarios where parameter sniffing in SQL server creates serious performance problems. This is very problematic with many EF generated queries, since there is no control that allows you to tell the database optimizer not to use the parameter values or cache a plan. A simple mechanism to hint OPTION (RECOMPILE) on the generated queries would solve most of these issues.

    A more sophisticated solution that would allow the generated sql to leverage (Optimize for Unknown) would also be useful.

    Parameter sniffing and the related performance problems are a very prevalent issue with SQL server and if you have ever run a real production app you will encounter it time and time again. I'm shocked there is still no workaround in EF (besides creating plan guides in the DB which are very fragile and impossible to manage in a dynamic filter scenario)

    If I'm missing another workaround please advise.

    BG supported this idea  · 

Feedback and Knowledge Base