SQL Index |¦| Indexes in SQL |¦| Database Index
Indexes in SQL are used to speed up SQL queries. A database index works much like an index in a book. For example, if you have a database table with a list of people, a common query would be to lookup someone by name. Creating an index means the database will not have to scan the entire table looking for matches. Instead, it will restrict its search to a small portion of the rows.
In this video we use a table with 100 million rows to illustrate how much an index can change the speed of a query.
Our SQL playlist starts here:
↪bit.ly/Socratica_SQL
Be sure to SUBSCRIBE for more SQL!
↪ bit.ly/SocraticaSubscribe
You may also enjoy our Python playlist:
↪bit.ly/PythonSocratica
♦♦♦♦♦♦♦♦♦♦
Ways to support our channel:
► Join our Patreon : / socratica
► Make a one-time PayPal donation: www.paypal.me/socratica
► We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
Thank you!
♦♦♦♦♦♦♦♦♦♦
Connect with us!
Facebook: / socraticastudios
Instagram: / socraticastudios
Twitter: / socratica
♦♦♦♦♦♦♦♦♦♦
SQL instructor: Ulka Simone Mohanty (@ulkam on Twitter)
Written & Produced by Kimberly Hatch Harrison (@khhsocratica) & Michael Harrison (@mlh496)
♦♦♦♦♦♦♦♦♦♦
It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🦉
Thanks for all great videos... Your explanations are simple and awesome :)
You guys are amazing, the quality of videos and the actress in the video is at par with a professional TV show or a movie. Excellent explanation as well !!!
😱👍⚡Socratica, you nailed it! This is the SQL course I recommend every day to SQL beginners. 🎇💥🎆🖐👍🖖🤘
Wish you the best. You are awesome.
Please continue SQL video series with more SQL concepts. Big fan :)
I thoroughly enjoyed the 596,000 ms spent watching this video.
The hardship is impossible to put into words...
But it lasts over 900000!
You might want to re-check that.
956,000 ms i guess
@@ahmeda8201 nope 596000k
She deserves an Emmy's for the quality content production. Fantastic scripts, visual and sound effects, and best actress. Love the (7-min) interlude of classical music, hilarious you. Totally loving this! Thank you Socratica, you really are awesome and indispensable!
Same here about the 7min 😄
Totally agree... I just love the contents this channel puts out
what was the name of the prelude, shazam could not find it.
Maaan, I graduated college 3 years ago, learning from all kinds of tutors and lecturers, but never like crazy Cyber Doctor here. I feel scared, and educated
Haha, "crazy cyber doctor"!
I remember a query that ran over six hours. Ever month again year after year. One day I checked the output and that query had run only a few minutes. I asked a colleague if there was a problem. She said 'O, i created an index.....'
haha nice learning experience
Hahaha that's brilliant 😂
How many entries and coloumns did the tables in the database had ? 6 hours seem crazy.
It took an year to get a solution for a slow running query.. ? 😂
@@googdriveforme4115 we wasn't looking for one lol
Whoever writes these scripts deserves an award. As well as this lady for delivering the lines perfectly and giving this great performance. Education and entertainment at it's best.
You just made databases interesting, and 10 mins ago I never even realised what an index was!
This couldn't be easier, crisper and more interesting. Simply enjoyable!!
I have 20+ years in data analytics and IT and this is one of the best videos on indexes I have found. Thank you for making this so educational and fun at the same time! I'm excited to check out your python channel next!
Thank you for your kind message! We're so glad you've found us!! 💜🦉
Could't agree more. Fantastic
@joncrosby1, Since you have 20+ years of experience, could you please guide me how to get a job in this field? I am a Computer Science graduate and want to go to Data Analytics (I dont want to be a hard core programming developer). I have learnt SQL, Basics of Python and Data Visualization tools like Tableau and also made some dashboard to learn properly. I need your advise on how to apply for data analytics job. Should I learn any more skills? like data warehousing or cloud? Please let me know. Thank you in Advance!
i just love this lady a lot.
Me tooo
me too
Me too
Same here, av falling in love with her videos ever since i discovered her channel
me too
As Ulka said at the end of this video, use indexes wisely! A general rule of thumb for indexes is that adding indexes to a table will speed up selects (that are constructed correctly) and slow down inserts/updates/deletes because whatever SQL system you use has to rebuild those indexes if a modifying transaction occurs.
I love the enthusiasm, robotic fast (not boring) narration, clear and practical examples, and the visualization! Definitely subscribing!
At last, I can understand mySql. Explained perfectly in a way my brain can comprehend. I will definitely be donating to keep you guys going. Thank you so much.
I am with you on this one
Me too
I can't believe a video on sql has quarter million views. That speaks to the quality of this video
Unbelievable! The best SQL tutorial I have ever watched. It couldn't be shorter and clearer. I bet even a child or even my grandmother could be able to understand it.
This is the channel I ve been waiting for long time. Thanks KZhead algorithm.
wow! This video worth a lot. B4 watching this i never knew index is this essential for faster performance. Well explained. Keep uploading such Videos. Animation were superb to understand quickly. God bless u.
10 min ago I never thought learning can be funny and interesting at this awesome level. Good job.
Love the comedic way you use to teach. Please, do not stop doing it!!
I've been looking for a tutorial for days that solves all the doubts I had before starting to use indexes, and this one definitely succeeded. Thank you very much! A fairly complete and well explained explanation!
I found this KZhead channel some time ago when I was first learning python and have been laughing ever since. I learn a good deal of important information here about methods/functions I thought I knew already. Its fun and informative and I hope you continue to educate me in this most hilarious fashion.
This was fantastic. Hands down the best online lessons I've watched.
WHAT A BLAST!!!!! I watched the whole tutorial, took notes I was literally hooked learnt a lot felt like watching a movie, the production and creation of this course is PRICELESS THANK YOU , wish there was a JavaScript course like this
Great video! One tip: Adding indexes to a table will speed up select commands but will also slow down other commands like insert/update/delete because the SQL server has to reconsider the indexes if any kind of modifying transaction occurs in the future.
I love this series. Keep up the great work!
I learned what I needed and laughed at the same time I was learning. Thank you for adding a lot of production value to the lesson.
ur such a life saver, i often dont understand immediately in class but those videos make me understand almost immediately, thats quality, appreciate it, wish ppl always invested this much time in teaching
I can't believe i watched the video. i learned something. and totally enjoyed every second of it.
This is the best coding channel I HAVE EVER SEEN!!!!!!!!!!!
I'm a professional that spends all day querying and this is the first video that explained it concisely
Wow, one of the best explanations I've ever seen. Congrats!
This was a most excellent series. Time well spent. Thank you so much for posting.
Ita amazing how something can be made informational and enjoyable both at the same time !
This is absolutely a fantastic video , I am subscribing This channel deserves number of subscribers that even the indexing will take time to count
Wow! Well done! This is by far the best video I've ever seen on SQL indexes. The demonstration was phenomenal!
Incredible. I've spent seven hours over the past two days refreshing myself on database concepts and filling in gaps and this was my favorite 10 minutes of those seven hours by a factor of 100 billion.
Fantastic. I'm slightly familiar with SQL because I only very occasionally need to have certain data pulled by our DBAs. Very cool @ 7:25 - I had that question. Thanks Socratica.
I really appreciate the effort you've put in the background sounds nd editing thereby making it very interesting.
I always think of this video when I create a clustered index. This tutorial very plainly outlines the benefits of indexes and how they can speed up our queries. Thank you!
WOW My jaw is on the floor at how amazing this video is! Quality, tone and speed of voice is on point. Explanations are well thought out and provide all necessary context to comprehend. Video/Audio editing is perfect with just enough to keep it interesting and remove distractions.
Must Amazing SQL Tutorial ... You Deserve More Than A Billion Subscribers
Thank you for such an amazing explanation. I have one question though, the index you created was that a clustered index or a non-clustered one?
wow, that was a hell of a playlist !! i could watch a million of these and never get bored. Thanks socratica
This was great thanks! Just had a query that was taking 2 minutes to execute. I added in about 9 indexes and it now runs in 2 seconds. Gamechanger!
Could you please tell the Socratica to make new series of topology, or any high math
Just fell in love with you after hearing your laughter.
The level of sarcasm is just the right amount and amusing! Keep up the great work :)
You should show query planner to illustrate how RDBMS determines which query plan to use. I'm guess that is already on your list of things to cover. After that, you should cover lock escalation under concurrent load where you have a mix of reads/writes on the same table. Then for the advanced SQL indexing concepts, compare b-tree versus bitmap indexes. If you get to report queries materialized views versus dynamic views for complex multi-dimensional queries :)
woooow really interesting and the way of her teaching and animation was awesomee....upload more videos on sql ,clear explanation ........congrats
you have no idea, how much you have helped me.. i have no words to say thanks .. it changed my whole DB speed .. thanks million ..
Your videos help me understand farrr better than my professors. Thank you so much for all you do!
Love how you're insisting on reading out all times in milliseconds like a programmer, even though the GUI already has converted it into more human digestible seconds and ms.
It's to make it sounds that it really takes a lot of time because 4000 is bigger than 4.
"The hardship is impossible to put in words." 😍
I don't think any educational material has been as entertaining as this playlist I just watched... It's mind blowing!... Totally the best investment of my time!
I, hereby declare that Socratica is the obvious front-runner for the first channel to reach 100 billion subs.
Extremely helpful video, thanks
what about : SELECT COUNT(*) FROM person WHERE last_name = 'Mohanty', AND first_name = 'Ulka'; Result: ONE! and only ONE! Messages: Successfully run. We found the best teacher in earth and mars! Total query runtime: 0 msec.
Have to say that this is the only video I have seen that makes SQL seems fun to learn. Thank you!
Love these videos. I'm not new to python, but this may just be the first video series I watch fully. Nice work!
"The hardship is impossible to put in to words!!!" 🤣🤣
one day machine will talk like human, human like machine
Did not expect this level of enthusiasm; not a complaint.
First, I really think these videos do a great job of teaching their lessons. Second, I really appreciate your commitment to the bit.
Fantastic job girl... Well explained... We learn the most when we are having fun... And you have successfully turned SQL into fun.... Love the craziness
One of the greatest explanations I've ever seen! Well done! Anybody knows the name of the piano music? 8:11
"Quasi una fantasia" (Moonlight Sonata) by Beethoven
This is a very informative video. I am so happy I finally managed to understand indexes. Thank you. Very explanatory.
The professors at our university can learn a lot about teaching from you! This was awesome
all in RAM
EVERY SINGLE COLUMN...YESSS! xD
Not a big deal.
Great video! How can I check if a database has index before running a query?
sp_helpindex Person.
This playlist was GLORIOUS. Thank you!!!
This is hands down the best video explaining this topic!
The typing effects music makes me feel like I'm in a game.
I dont know how you do it, but i watch this for entertainment.
oh i love how you explain it! 1000x better than the teacher from the course I am attending. Thank you for sharing your amazingness with humanity, and for making a boring subject very interesting and fun
This is one of the best computer science videos I've seen in my career (I'm final year 2 at uni) and whole life also, you rock!
these are the best tutorials because they short and sweet just like my stamina in bed.
9:34 I can hear somebody BTS snickers ...
Absolutely outstanding content. Such a clear breakdown showing the before and after. Thank you
The way teach or explain, Its best. Concepts just penetrate into mind. Took me 4050ms to write this😂😂
did anybody else feel like yelling : "FIRE THE LASSEEEEERRRR"
She is Dr. Evil's daughter 😂
Oh, that laugh @0:07!
or 9:29 xD
@@Nsuidara Oh,yeah, forgot that one which not even Rita Repulsa can do better.
never learn faster and clear before about indexes, thanks a lot
This is how I need SQL explained to me, thank you so much!
"Indexes"?? Ok, we declare war on Mars for despicable crimes against human language. Your sins would not go unpunished.
grammarist.com/usage/indexes-indices/ Although you are right that it is used in the wrong context, it is not incorrect to say "indexes".
@Socratica, although your Python series was far more entertaining and captivating, this SQL series is just as informative and educational. Nonetheless I love you for your ability to break down key concepts. Thank you!
This is quite a goofy video but at the end I learned everything I needed unlike from watching other videos on this topic by different content creators. Thank you for such a great video.
I first encountered your videos when I was learning python in the beginning of pandemic lockdown. The python videos are sarcastic and engaging. Thank you.
Yes finally a decent video that is in English and understandable for human beings
Thank you for not only vulgarizing efficently but also doing it in such a fun way. You are much appreciated
Amazing editing and the explanation couldn't have been better. Thank you!!
Thank you! This is what I've been looking for so long. You explained it very simply and only the important things. Thank you! 😍
Excellent video.
lovely and smart...mindblowing... one semester of SQL just done... . i loved it !!!
Straight to the point unlike other tutorials. I only needed the concept really..
This was one of the most fun tutorials I have watched in my life.
I absolutely love the narration style.
Omg, this channel... The songs, wallpapers, environment, I just loved it! Congratulations.
This lady is on another level. You have taken KZhead to another level
overly simplified and ideal way to explain Indexing. Thank you so much
Thank you. This video on indexing help me speed up a project I have been working on for two years. I love your teaching style, you are awesome. Keep it up!
We love to hear how are videos are helping people in the real world!! It really inspires us to make more. Thank you for sharing!! 💜🦉