OPTIMIZE FOR UNKNOWN vs. OPTIMIZE FOR VALUES In SQL Server

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 20

  • @chrismettler136
    @chrismettler136 13 днів тому +1

    cool, didn't know this

  • @stephenlawrenson2380
    @stephenlawrenson2380 13 днів тому +1

    You never got me a Dark Mode T Shirt, even though I bought you a drink - and now I have subscribed!! Keep being mean 😂😂

    • @ErikDarlingData
      @ErikDarlingData  13 днів тому

      I could only get one. If you’re a size medium, I’ll send it to you.

    • @stephenlawrenson2380
      @stephenlawrenson2380 13 днів тому +1

      @ as I said, YFB size for me buddy -only joshing with you 😉😂

    • @ErikDarlingData
      @ErikDarlingData  13 днів тому

      What is that? Youth Furry Bottom?

  • @andreysamykin1143
    @andreysamykin1143 11 днів тому +1

    Thanks for interesting stuff!
    7:43 I wonder what’s the best approach to fix such terrible underestimation?

    • @ErikDarlingData
      @ErikDarlingData  11 днів тому

      Don’t use the query pattern I used.

    • @andreysamykin1143
      @andreysamykin1143 11 днів тому

      @@ErikDarlingData yeah, in this case it’s clear, but in general - that’s the question. Is it covered in your training videos? I would buy it then )

    • @ErikDarlingData
      @ErikDarlingData  11 днів тому

      @ I cover many ways to improve estimates in my videos. Whether I cover the specific way you need to improve estimates is unknown. You could probably find worse ways to spend your time and money, but then again you’re already here 😃

  • @FlaggedStar
    @FlaggedStar 13 днів тому +1

    Now to find a video on fixing these query patterns...

  • @Groot_for_prez
    @Groot_for_prez 12 днів тому

    Great video, is there a good way to extract - format the compiled params out of the plan XML for easy use when testing the modified query in TSQL?

    • @ErikDarlingData
      @ErikDarlingData  12 днів тому

      The easiest way to answer that question is for you to open the plan XML and search for your parameter names. You might be surprised by what is there (or not there) in different scenarios.

  • @BrisbaneAgain
    @BrisbaneAgain 12 днів тому +1

    Is there a new plan for each "optimise for" value in plan cache? What about pspo?

    • @ErikDarlingData
      @ErikDarlingData  12 днів тому

      No, just one plan. PSPO doesn’t work when optimize for hints are supplied.

  • @douglascoats7081
    @douglascoats7081 13 днів тому +1

    nice kitchen sink