A Little About Multi-Column Indexes In SQL Server

แชร์
ฝัง

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

  • @FlaggedStar
    @FlaggedStar 5 หลายเดือนก่อน +5

    Careful! If you keep this up, Brent will have nothing to sell!

    • @ErikDarlingData
      @ErikDarlingData  5 หลายเดือนก่อน +2

      HAHAHA, I might not either

  • @vlastimirmasic5769
    @vlastimirmasic5769 5 หลายเดือนก่อน +1

    Erik - amasing content! Something new to learn every day 🙂

    • @ErikDarlingData
      @ErikDarlingData  5 หลายเดือนก่อน +1

      Gotta keep that content train rollin! 🚂

  • @flyingcod14
    @flyingcod14 4 หลายเดือนก่อน +1

    Great video, thanks Erik.

    • @ErikDarlingData
      @ErikDarlingData  4 หลายเดือนก่อน

      Very welcome! Thank you for watching!

  • @clerincg
    @clerincg 2 หลายเดือนก่อน +1

    Hey Erik - I'm catching up on some of your GREAT videos (really appreciate you)... Interesting use of Computed Columns and Indexing. I have a few questions on computed columns in MS-SS:
    1) Do computed columns consume storage in the table or are they evaluated dynamically based on the formula? (I created a compute column recently on a table with 500MM rows and it was instantaneously created - That prompted my question)
    2) If computed columns do actually reside as data in the table, what is the DML overhead to maintain a computed column?
    3) Similarly, I assume that an index on a computed column consumes storage. What is the DML overhead to maintain that index as well.
    4) Finaly, in a recent video, you introduced HIDDEN columns. Can a Computed Column be HIDDEN and still used as in your example?
    I hope that these questions are not out-of-scope for this video, but still good questions??? Thanks!

    • @ErikDarlingData
      @ErikDarlingData  2 หลายเดือนก่อน +1

      1) They only consume space if you persist them, or index them
      2) Usually the same as a regular column (assuming indexed or persisted), but far less as an expression, with some caveats around the expression
      3) Too many variables to answer succinctly, but generally not more than maintaining an index on any other column
      4) No, that's specific to the temporal column syntax

    • @clerincg
      @clerincg 2 หลายเดือนก่อน

      Thanks, Erik!!!

  • @voutetigre4
    @voutetigre4 5 หลายเดือนก่อน +2

    It did stop recording :D
    Anyway, thanks again for the video

    • @ErikDarlingData
      @ErikDarlingData  5 หลายเดือนก่อน +1

      It took a bit of extra work for some reason. Perhaps it wanted me to keep going.

  • @stephenlawrenson2380
    @stephenlawrenson2380 5 หลายเดือนก่อน +1

    I want to see the math!!
    Anyway, back to crayoning on my nice padded walls 😂😂

    • @ErikDarlingData
      @ErikDarlingData  5 หลายเดือนก่อน

      Ha ha, they might be in a white paper somewhere. I forget at this point.

  • @esatsaglam2800
    @esatsaglam2800 4 หลายเดือนก่อน +1

    Nice comment!

  • @ntobergta
    @ntobergta 4 หลายเดือนก่อน

    How about datetime correlation?

    • @ntobergta
      @ntobergta 4 หลายเดือนก่อน

      *If you have FKs

    • @ErikDarlingData
      @ErikDarlingData  4 หลายเดือนก่อน

      But this is just two columns in one table. That can't really work.