This is far and away the best indexing video I have watched. Every other one barely goes into how indexing works under the hood, or use analogies that don't really make sense. Keep up the awesome content!
It’s not that accurate though. He used binary search instead of a B tree (though he did briefly mention it) but I think that misguides the viewer into thinking that’s also what is happening. It also fails to explain the importance of avoiding reading from disk (the whole point of using B trees over AVL or red black trees for example).
@@GarenteiOnly after reading your comment, things seemed to make sense. Any resources for fine-tuning DB index knowledge? Please share if you got any. Thank you in advance!
@Garentei this video is for a dumb developer, not for advanced guys. This way it gives a dumb dev bit of confidence to go further. If someone directly starts with advanced vocab and data structures, then it scares a dumb guy
It's good but it's not the best on TH-cam. There are plenty of videos that all can be the BEST. You just understand this video because you lacked knowledge or understanding of words used in other videos.
More on the performance hit of indices on WRITES. How does it work? Does it: A. Insert the new row in the TABLE (O(1)). Find where the index should be placed (O(logn)), insert it there (O(1)). Or does it: B. Insert the new row in the TABLE (O(1)). Query the whole TABLE again (constant). Sort it again (O(idk)). Save it in the index (O(1)). --- I'm guessing A, but I'm not even sure if that's possible lol. I guess the "finding where the index should be placed" would be the slow part and most likely it would be equivalent as doing the same SELECT query for that column as well? Since you mentioned that SELECT is O(logn): Essentially writes would be O(logn). Would that be, correct?
Thank you very much for the video. I have one question: What happens, if I execute a query on a non indexed column? Based on your explanation, the Blocks stay on disc and when B and I are found by an index, they can be loaded explicitly. When there is no index and I execute a query, is the "load from disc into memory" operation done at runtime? Thanks a lot
I have a program which is doing a lot of queries against a table. The problem is that the program is too slow, and it's updating many records. How can I speed it up? Can i index columns used in searches that is not getting updated? Or does indexing get slow eitherway if i update records in a table with indexed columns?
there are a lot of sh** TH-camrs who upload trash in the name of content, but you are opposite to those. Thank-you for this precise and easy on mind tutorial!
This is far and away the best indexing video I have watched. Every other one barely goes into how indexing works under the hood, or use analogies that don't really make sense. Keep up the awesome content!
It’s not that accurate though. He used binary search instead of a B tree (though he did briefly mention it) but I think that misguides the viewer into thinking that’s also what is happening. It also fails to explain the importance of avoiding reading from disk (the whole point of using B trees over AVL or red black trees for example).
@@GarenteiOnly after reading your comment, things seemed to make sense. Any resources for fine-tuning DB index knowledge? Please share if you got any. Thank you in advance!
@Garentei this video is for a dumb developer, not for advanced guys. This way it gives a dumb dev bit of confidence to go further. If someone directly starts with advanced vocab and data structures, then it scares a dumb guy
recap:
7:08 full table scan
12:26 binary search
13:56 we shouldn't add index at everything
This video explained indexing so simply that I can't forget it ever!!!
I came for indexing, but couldn't help but notice that Laith is making $54 million while my boy Todd is making $27k....Laith must be the CEO
BEST Indexing explanation video on TH-cam
It's good but it's not the best on TH-cam. There are plenty of videos that all can be the BEST. You just understand this video because you lacked knowledge or understanding of words used in other videos.
@@jay_wright_thats_right lol bro so serious 😭😭
Study it tooo long ago, recently my boss put me on the spot with ‘what is an index in db’ haha. Now I know, thanks mate. Good video
Thank you so much, actually the best and the fastest explanation I've ever heard for indexes❤
Finalyy a tut that really explains what indexes are... The only one till now. Than you!
I have watched numerous videos, but this is the best explanation so far. Kudos.
More on the performance hit of indices on WRITES. How does it work?
Does it:
A. Insert the new row in the TABLE (O(1)). Find where the index should be placed (O(logn)), insert it there (O(1)).
Or does it:
B. Insert the new row in the TABLE (O(1)). Query the whole TABLE again (constant). Sort it again (O(idk)). Save it in the index (O(1)).
---
I'm guessing A, but I'm not even sure if that's possible lol. I guess the "finding where the index should be placed" would be the slow part and most likely it would be equivalent as doing the same SELECT query for that column as well? Since you mentioned that SELECT is O(logn):
Essentially writes would be O(logn). Would that be, correct?
Now i understand this system design term... Please make more videos on cool stuffs like this.
Thanks so much!!! You make it so much easier to understand than my Uni.
In my opinion, this explanation presents a very clear analysis and straightforward approach to database indexing.
I approve the simple explain award to this video on TH-cam about indexing
i have looked up to many videos and just came across this detailed best explanation
Thank you very much for the video.
I have one question:
What happens, if I execute a query on a non indexed column? Based on your explanation, the Blocks stay on disc and when B and I are found by an index, they can be loaded explicitly.
When there is no index and I execute a query, is the "load from disc into memory" operation done at runtime?
Thanks a lot
Great explaination, can you do B-tree and Hash in DB Indexing?
can you do something like this for mongoDB?
This was way too easy to understand. Thank you for the explanation.
Is this somehow how it works in Windows when it indexes files for file search?
I have a program which is doing a lot of queries against a table. The problem is that the program is too slow, and it's updating many records. How can I speed it up? Can i index columns used in searches that is not getting updated? Or does indexing get slow eitherway if i update records in a table with indexed columns?
But even though we significantly reduced the search time, we have increased the time required to add a record right?
lol
Hands down the best tutorial on index❤
great tutorial bro, keep it up, good luck to your channel !!
This index are stored in disk or memory?
Laith, Please do a course on Database
Please. Please. PLEASE
whoa! fantastic lesson! More content please!
what annotation app are you using
Great explanation.
Hands down best video
Now i understand this system design term... Please make more videos on cool stuffs like this. also Tsm
there are a lot of sh** TH-camrs who upload trash in the name of content, but you are opposite to those. Thank-you for this precise and easy on mind tutorial!
Very well explained. Thanks for that
Great explanation! Thanks!
Great explanation for database indexing. Thanks!
Very good tutorial. Thank you.
Super informational! Thank you.
Wow you made this easy. Great video
100% dope explanation of indexing
You explained the unexplainable, that calls for the glock glock 3000
i was watching happily till i read the title
This was so helpful. Thank you!
Awesome, thank you.
Best video on Indexing
This was a solid explanation
Fantastic. Thank you very much.
Quality lecture. Thanks...
best video so far
Great explanation!
Excellent!
But you don’t have to call me dumb though this is already enough 😞
Amazing!!!😍
thank you so much
If i understand by this video, am i dumb ?
Apparently... I also think it s a stupid title, and to call your viewers dumb... Why?
Excellent🥳
Thank you !
Thank you
my kind of content
Helpful, ❤ from India
great tutorial!
I like Laith's salary
♥
well explained
thank you very much :)
thanks man
Awesome
Algorithms and Data Structures😀
I don't usually subscribe, but ...
Increase to 1.5x speed for smoother flow
Laith is getting a fat check $
Watch this video on 1.25x speed. You're welcome!
It's for dumb developers
the title of the video is pretty much embarrassing to click on.
Question to me : Am I Dumb ? No
So dont click on the video.
developers could have explained this in 5 mins in very much better way
As a dumb developer I must say I didnt understand.
DUMP? Well,....
I hate that you couldn't cut a wait from the animation...
Thank you!