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!
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
Careful! If you keep this up, Brent will have nothing to sell!
HAHAHA, I might not either
Great video, thanks Erik.
Very welcome! Thank you for watching!
Erik - amasing content! Something new to learn every day 🙂
Gotta keep that content train rollin! 🚂
Nice comment!
Mission accomplished
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!
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
Thanks, Erik!!!
It did stop recording :D
Anyway, thanks again for the video
It took a bit of extra work for some reason. Perhaps it wanted me to keep going.
I want to see the math!!
Anyway, back to crayoning on my nice padded walls 😂😂
Ha ha, they might be in a white paper somewhere. I forget at this point.
How about datetime correlation?
*If you have FKs
But this is just two columns in one table. That can't really work.