Good review. Thanks. What I learned: varchar = less space, faster performance. Ok, but under what conditions does char have an advantage? Must have some advantage, otherwise it would disappear, or am I missing something? I would like a future video explaining the difference/advantage/disadvantage of varchar vs nvarchar.
I use CHAR all the time, just only use it for specific length items, like a currency type USD, INR, GBP ( use a CHAR(3)), or a Y or N ( use a CHAR(1)). I would NOT use a CHAR 3 and store Yes or No because would leave a blank char. So in practicality, you would never use a CHAR for anything longer than 10 unless you really know what you are doing. And WHY use it at all? Indexing and plan caching. If you have one of the CHAR fields tuned correctly, then the SQL engine knows EXACTLY how memory to allocate for the plan and index. I can think of about 8 more reasons why a CHAR would be useful, just need to think outside of the box. Hope this helped!
Good review. Thanks. What I learned: varchar = less space, faster performance. Ok, but under what conditions does char have an advantage? Must have some advantage, otherwise it would disappear, or am I missing something?
I would like a future video explaining the difference/advantage/disadvantage of varchar vs nvarchar.
I use CHAR all the time, just only use it for specific length items, like a currency type USD, INR, GBP ( use a CHAR(3)), or a Y or N ( use a CHAR(1)). I would NOT use a CHAR 3 and store Yes or No because would leave a blank char. So in practicality, you would never use a CHAR for anything longer than 10 unless you really know what you are doing.
And WHY use it at all? Indexing and plan caching. If you have one of the CHAR fields tuned correctly, then the SQL engine knows EXACTLY how memory to allocate for the plan and index.
I can think of about 8 more reasons why a CHAR would be useful, just need to think outside of the box.
Hope this helped!
Thanks for such demonstration, your videos are always informative.
Looks simple concept really powerful, Thanks a lot🙌
Informative video. Thanks
Amazing Amit !
Thank you sir!!!
Nice one
can you please create database design videos for mssql developer
Wow nice video