Picking the right string column datatype - CHAR vs VARCHAR vs TEXT

  Рет қаралды 13,360

Arpit Bhayani

Arpit Bhayani

Күн бұрын

Пікірлер: 34
@Basukinathkr
@Basukinathkr 10 ай бұрын
Thanks Arpit. I have seen very exerienced people using varchar as a one-size-fits-all approach. They simply put any random number with it and it's done. In an enterprise environment, changing this using some liquibase script or any other approach not only involves lots of re-discussion but also break stuff. This topic of CHAR vs VARCHAR vs TEXT is very much important to understand and implement.
@rocksh1234
@rocksh1234 10 ай бұрын
Arpit, the explanation that you provide is extremely well-designed and in-depth. Its always a treat to watch your videos. Since you dive deep into system design concepts, request you to create a solid video on SOLID principles, this would help all levels of engineers.
@yash_renaissance_athlete
@yash_renaissance_athlete 10 ай бұрын
Hi Arpit, great video as usual. It would be great if you can create a video about the behind-the-scenes of the disk IO involved with GETting a row (all the jazz around blocks, page seeks, etc.). That would also end up emphasizing and justifying the reason why there’s an additional latency of fetching a long TEXT/VARCHAR from a different page lookup and why DBs prefer to keep their rows short. Rest, keep on making such amazing videos.
@AsliEngineering
@AsliEngineering 10 ай бұрын
That is my next video. Adding it here would have made this video an hour long. Next few videos will be about Heap tables and Toast tables.
@yash_renaissance_athlete
@yash_renaissance_athlete 10 ай бұрын
@@AsliEngineering Thanks a ton. Appreciate it! Will wait eagerly for the next one :) My obsidian is filled with the notes of your videos by the way 😂 Cheers!
@DD-ds7ui
@DD-ds7ui 10 ай бұрын
best channel! Thank you for sharing your knowledge 🙏🏽
@dhruvgarg722
@dhruvgarg722 10 ай бұрын
We can also have index on TEXT field, can you elobrate on reason why varchar is better for quick index lookup for exactness?
@AsliEngineering
@AsliEngineering 10 ай бұрын
that will be in my next couple of videos. some really interesting decisions taken by postgreSQL here.
@dataoil3620
@dataoil3620 10 ай бұрын
Thanks Arpit, another great video! Just a suggestion to make videos more interestiing, 1. I think you should use white background without any lines. 2. Just use 1 or 2 types of inks. 3. Also I think writing in slides format is better because if someone wants to read on the page, its little confusing to what to look at and where to start from. Thanks again.
@AsliEngineering
@AsliEngineering 10 ай бұрын
Thank you for the suggestion. I tried with typed slides, but that felt more like lecture and less like a video. Plus here I can scribble and doodle. But point taken, let me make some alterations.
@sharadkaushik79
@sharadkaushik79 10 ай бұрын
thanks Arpit bhai
@gecarter53
@gecarter53 10 ай бұрын
Good comparison of the 3 data types. What about NVARCHAR?
@rohitdeshmukh197
@rohitdeshmukh197 10 ай бұрын
Great content, exactly what I wanted to know. Thank you
@arshghaiwat5241
@arshghaiwat5241 10 ай бұрын
Thanks arpit❤
@whenkunda8447
@whenkunda8447 10 ай бұрын
@arpit, can you give a usecase for char? I find it hard to believe major dbs chose to implement it if there is no use case?
@whenkunda8447
@whenkunda8447 10 ай бұрын
Never-mind gen AI to the rescue 😂 • Fixed-length fields: CHAR is useful when you need to store data that always has a fixed length, like an ISBN number or a credit card number. • Alignment and formatting: CHAR can help with aligning data in tables or reports, ensuring consistent spacing and formatting. • Compatibility: In some legacy systems or older databases, CHAR might be required for compatibility reasons.
@AsliEngineering
@AsliEngineering 10 ай бұрын
It is a legacy column. Old systems and use cases had a requirement. Now it is not much prevalent.
@AsliEngineering
@AsliEngineering 10 ай бұрын
But even these are now stored with varchar. Earlier it helped with displays without post processing
@whenkunda8447
@whenkunda8447 10 ай бұрын
Thank you very much. I appreciate the response!
@drunkcse7476
@drunkcse7476 10 ай бұрын
Please make a video on index only scan vs index scan vs bitmap index.
@snehil3209
@snehil3209 10 ай бұрын
I'm here from X. What a content man!!! Already subscribed. I'm in 4th year Plz guide me how should i start system design from your playlist.
@AsliEngineering
@AsliEngineering 10 ай бұрын
Start with kzbin.info/aero/PLsdq-3Z1EPT36NJXTutvKcreetuHCr9a- and then explore other videos from other playlists. Whenever you dont understand or come across a new term. DFS.
@anandatole6529
@anandatole6529 10 ай бұрын
Hi Arpit do you have any advance course on MongoDB
@AsliEngineering
@AsliEngineering 10 ай бұрын
nope. I do not have a course on MongoDB.
@harshil1466
@harshil1466 7 ай бұрын
Can the promotional stuff go to the end
@AsliEngineering
@AsliEngineering 7 ай бұрын
No. Given my videos are heavy on engineering, most people don't watch till the end. I need to promote things at the beginning.
@harshil1466
@harshil1466 7 ай бұрын
@@AsliEngineering ahh makes sense is there any way we can get a separate paid version ? Cause this is something i always get irritated by causing me to close the video.
@anujverma8057
@anujverma8057 5 ай бұрын
Good information but it would be best if the information is in hindi .
@kaushikkumarbora
@kaushikkumarbora 10 ай бұрын
Arpit take some vitamin d
@AsliEngineering
@AsliEngineering 10 ай бұрын
Yes. since last few months I have been doing this more often :)
@oldgangster4119
@oldgangster4119 10 ай бұрын
Why?
@VedankPande
@VedankPande 10 ай бұрын
I'm designing a new-ish schema right now and was contemplating between varchar and text. Immaculate timing!🫡
@AsliEngineering
@AsliEngineering 10 ай бұрын
Right on time it seems 😅
@VedankPande
@VedankPande 10 ай бұрын
@@AsliEngineering 🙌🙌
The compression algorithm that powers all Time-series Databases
13:24
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 28 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 154 МЛН
Understanding Proxy, Forward Proxy, and Reverse Proxy
9:41
Arpit Bhayani
Рет қаралды 33 М.
How do indexes make databases read faster?
23:25
Arpit Bhayani
Рет қаралды 76 М.
Are Multi-Column Indexes a good idea?
11:22
Supabase
Рет қаралды 5 М.
How DNS really works and how it scales infinitely?
16:35
Arpit Bhayani
Рет қаралды 29 М.
How LinkedIn improved their latency by 60%
10:00
Arpit Bhayani
Рет қаралды 46 М.
7 Database Paradigms
9:53
Fireship
Рет қаралды 1,6 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 28 МЛН