Rewriting Queries with Temporary Staging Tables

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 19

  • @simon_k4551
    @simon_k4551 5 ปีที่แล้ว

    I had the very same issue issue on the payroll system I used to support. Despite numerous attempts to get the queries re-written, nothing was done. "It works fine on our system," claimed the supplier. Of course it does, you don't have much data in it.
    The main failing of SQL developers is that they have their heads in the sand when it comes to scaling up data. Every database we had issues with was the same, written and tested against a small data set. "Duh!"
    Nice presentation.

  • @shubhamkanojia4068
    @shubhamkanojia4068 4 ปีที่แล้ว

    Hey Birt... I saw you in one of Pinal Dave's videos. Then saw your channel and subscribed it today. I like the way you have made the video series and it helps understand one concept at a time.
    Keep them coming. All the best

  • @sql3051
    @sql3051 5 ปีที่แล้ว +1

    Bert, Another great subject simply explained with a good example. Thank you again.

  • @pavanmadineni4632
    @pavanmadineni4632 5 ปีที่แล้ว

    Thanks Bert. Please keep on bringing such kind of info on performance tuning stuff.

  • @mooremike44
    @mooremike44 5 ปีที่แล้ว +1

    It is easy to forget you can create indexes on temp tables. Thanks for the reminder.

  • @stefanotorelli3688
    @stefanotorelli3688 5 ปีที่แล้ว +1

    Good explanation! I very happy you stated the fact the most of the people think that CTEs “cache” their result sets. I really do not understand why they think that, because it is not written anywhere… Please, do you have additional explanations?

    • @stefanotorelli3688
      @stefanotorelli3688 5 ปีที่แล้ว

      @@DataWithBert Materializing a CTE is some sort of "parameter sniffing" technique... that is why caching the result set is implemented at application level and not at RDBMS level... until SQL Server vNext....

  • @dbrown535
    @dbrown535 5 ปีที่แล้ว +1

    Great Video Bert! I have really enjoyed this series!

  • @jared0180
    @jared0180 5 ปีที่แล้ว +1

    Great video Bert! Keep up the GREAT work!

  • @ivanushkadurachek4713
    @ivanushkadurachek4713 5 ปีที่แล้ว

    Well done Bert. Keep Posting

  • @marcosoliveira8731
    @marcosoliveira8731 4 ปีที่แล้ว

    I've learned new stuff here man. Thanks a lot.

  • @avinash8535
    @avinash8535 2 ปีที่แล้ว

    Hi, well we can use temp tables to store data and can reference multiple times in Procs/Queries.. What if we are dealing with views, what sort of approach we go with to write in an optimized way.. Pls suggest, thanks

  • @Remador4ever
    @Remador4ever 2 ปีที่แล้ว

    Nice video Bert,

    • @Remador4ever
      @Remador4ever 2 ปีที่แล้ว

      I have a set of OLAP reporting tables that come from staging tables after being processed where you can run reports and analytics on the OLAP tables to gather insights from the data.
      “I can’t run my reports for yesterday. How you go about investigating this?. What you prevent this for later?

  • @89inoj
    @89inoj 5 ปีที่แล้ว

    Great job! Thanks a lot for knowledge sharing!

  • @joev9224
    @joev9224 4 ปีที่แล้ว

    Nice video! As usual! Question: Why when you saved the table to a #temp table did the (12) logical reads not come from "Worktable" which I thought was TempDB. Is it because the "#January..." records were somehow in the Buffer Pool already, and therefore not in Worktable?? Tx in advance!

  • @Vishalkumar-vj7hx
    @Vishalkumar-vj7hx 5 ปีที่แล้ว

    Great Video Keeping posting more video

  • @oresteszoupanos
    @oresteszoupanos 5 ปีที่แล้ว +1

    Nice video again, Bert!
    To make the Statistics IO outputs even prettier, you could use statisticsparser.com/.
    Might be overkill in most situations, but really helpful for more complex queries with lots of tables!

  • @codekabinettcomen
    @codekabinettcomen 5 ปีที่แล้ว

    Well done! I wasn't aware of that fact on CTEs.
    The low volume background music at the end was slighly distracting/disturbing.