‫OK, what's the limitations of batteries, batteries are not perfect, and that's why it was a variation
‫was created to solve these limitations.
‫So the first problem is elements and all nodes store both the keys and the values.
‫Right.
‫And because we store the key and the value in every single node, then you can only store so many elements,
‫because let's go back here and see.
‫Here's why.
‫If I'm reading this node.
‫Right.
‫If I'm reading this note or this page, because are effectively the same thing they base, then you're
‫going to put pull keys four and eight and their corresponding values.
‫So if you're searching for the key one, you really just use the key ID and use the values.
‫So you wasted precious memory space.
‫That you didn't really use, if you think about so alternatively.
‫I can if I'm studying the values in that page, in the note, then these values are not just this is
‫this could be up to 64 bit so or some people still guedes.
‫So think twice when you create an index on it, on a UUID or a string, because that buppie exists right
‫here.
‫Right.
‫Like if if you create, for example, a primary key right on a Stringfield, then this string values
‫are stored on one B plus to restore them and then lether, which are we going to discuss.
‫But, but they are stored and when they are stored they take more space.
‫More space means I can fit less elements.
‫In a page or an A. And if I had this element, then I need to read more.
‫Right, because I need to I need to put more nodes, more nodes mean more pages, more pages means more
‫IO, more IO means slow.
‫So that's the trickier elements.
‫No, no, still both.
‫So they take more space, thus require more IO and can slow down the traversal.
‫So that's the trick here.
‫So we're Mitsos and what else?
‫If we don't know the value you need to store the value at some point.
‫Right?
‫Well, when we're going to talk about that, another limitation of the betrayal's range queries are
‫slow because of the random access, because you're jumping back and forth.
‫If you give us if you vesku give me all the values between one and five and I'm going to show you an
‫example in a minute, then we're going to jump all over the place to find one and then find two and
‫find three and find four and then five.
‫Five.
‫Right.
‫I have to do five different reversals to find these values.
‫Not necessarily might be a little bit less if you're lucky.
‫But that's that's what I need to go.
‫It's almost random, right.
‫Despite them being very tucked next to each other.
‫The keys.
‫Right.
‫Give me old should be keys, not values.
‫But you get my point.
‫I'm searching for these values, these keys effectively, but B plus three solve both these problems.
‫Another problem with this is like it's hard to fit internal nodes in memory when you have all these
‫values right.
‫In in in each element because you have all these values, then I can't really fit stuff in memory,
‫especially like I don't know if I have a primary key on on a UID field or on a stringfield.
‫Right.
‫Then it becomes very expensive to store this index or this Vetri in memory because it costs a lot to
‫traverse as an example for why batteries can be bad for Orange County.
‫So I'm going to now find all the rows I'd between four and nine in this in this particular battery.
‫So I'm looking for four and I want to pull all these rows so I can look up Pete, Edmund and Edmund
‫Sarah.
‫And so what I'm going to do is, OK, the search number for oh, we were lucky.
‫We found number four.
‫OK, let's find let's find number five was five.
‫Well, five is between four and eight.
‫So we jump to this data point, a child's point of find to this page, page Poynton and get to six or
‫Wuhl five is actually less than six.
‫So let's jump another.
‫I also one iota I 030 we found five.
‫OK, let's find, let's go ahead and find six.
‫All six.
‫We just actually read in a minute that goes oh it's in memory hot right.
‫Unless we had to throw it back into the desk for full LRU reasons at least recently.
‫Use cash like if we throw it back.
‫But is there ok we find six or seven go and find seven.
‫We found it.
‫All right.
‫How about eight.
‫Eight is all.
‫There you go.
‫I put on the road how one nine nine is in this side.
‫Go here.
‫We read this page and then go on and then to the left.
‫This is nine and then we find the value.
‫So look, I don't know what how what we have done to find this any might look at this.
‫I say it's not that bad.
‫But we thrashed the index to look for these five values, despite them technically being next to each
‫other.
‫They are sorted.
‫They are next to each other.
‫Right.
‫And that's another thing that B, B plus trees solved.
‫Another thing, B plus three solve is like it tries not to put values in these kind of hot searches.
‫It tries to to make this as slim as possible to search and pushes all this all the data to the leaves,
‫as we can see in the minute.