Hugo Kornelis

My feedback

  1. 316 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  9 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis supported this idea  · 
  2. 47 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    7 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Hugo Kornelis commented  · 

    Two points of clarification are needed.

    First: The phrasing of the suggestion may make it appear as if the new proposed names are endorsed by Pedro Lopes. This is not correct. The suggestion comes from Erin, Grant, and me; Pedro has assisted us by reviewing the blog post and giving suggestions but did not sign off on the suggested new names.

    Second: The main purpose of this suggestion is to replace the names "Estimated Execution Plan" and "Actual Execution Plan" with something better, something that does not reinforce the incorrect notions that estimated plans are not real, that they will not be used because they are not the actual plan, or any of the other common misunderstandings related to these names. The replacement names are our suggestions, but they are not the core of this suggestion. If other names are considered better, then please use those. Just make sure that the new names will not be prone to the same, or new, misunderstandings.

    An error occurred while saving the comment
    Hugo Kornelis commented  · 

    Happydba, Max Vernon: I'm glad that you are not confused by the existing terminology. But lots of others are.
    Too many people look at an execution plan and then say "yeah, but that's only the estimated plan, the actual plan might be different".
    Too many people think creating an "estimated" plan is a different process from creating an "actual" plan (whereas in reality the only difference is that the "actual" plan is made by adding data collected at run time).
    And this confusion stems from using different adjectives in front of "execution plan", which make it SOUND as if they are different plans.

    Joe Obbish: I don't know what "PEO" means. What your repro shows is the result of variable inlining, which only happens for a statement-level recompile. This happens before the optimizer even starts. The query gets internally changed to:

    SELECT * FROM master..spt_values
    WHERE @dummy = 1

    UNION ALL

    SELECT * FROM master..spt_values
    WHERE @dummy = 0
    OPTION (RECOMPILE)

    And not that this happens when the statement executes. So at execution time the optimizer will first compile the batch (resulting in the same execution plan as you'd get when you hit the "get estimated plan" button), then execution starts, then before this statement starts a NEW plan is compiled, now with the variable inlined which allows a branch to be removed from the plan. And this plan is then later enriched with run-time statistics and returned to the client.

    As already mentioned in the blog, recompiles can cause a new plan to be created. That new plan can look different from what was compiled before. But it's not a different type of plan.

    Hugo Kornelis shared this idea  · 
  3. 16 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis supported this idea  · 
  4. 4 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis supported this idea  · 
    An error occurred while saving the comment
    Hugo Kornelis commented  · 

    I checked and I can reproduce the issue on both SQL Server 2017 and SQL Server 2019, as long as the compatibility level is high enough.

    When I change the conpatibility level to 100, the estimate is 1 for each query.
    So it appears that this is an issue with the new cardinality estimator only.

  5. 36 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis supported this idea  · 
  6. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Other  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis supported this idea  · 
  7. 27 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis supported this idea  · 
  8. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 186

    <=-=Oct 7 2009 7:03AM=-=>

    I think it could be even deeper down, because not everybody develops using BIDS or Visual Studio or the UI. If I run an Enterprise-only statement in a query window, I should be able to see an attention event, or something similar to the deprecation warning, when using features that don’t run on the target you’ve specified. When I know I am targeting standard or lower, I can simply check for that event. Much simpler than reviewing all of the features and code against some checklist. This could be set at the database level and/or server level, so that you can be working on multiple dev databases at the same time, potentially with one targeting express and one targeting standard… then an event would be raised if, for example, you used CREATE PARTITION SCHEME. But you’d also want to catch server-level things (e.g. …

    Hugo Kornelis supported this idea  · 
  9. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  10. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  11. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  12. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  13. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  14. 35 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  15. 5 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  16. 8 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  17. 389 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  15 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis supported this idea  · 
  18. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  19. 11 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 
  20. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Hugo Kornelis shared this idea  · 

Feedback and Knowledge Base