769 questions
1 vote
0 answers
163 views
MongoDB total keys examined when multiple documents have the same key value
Consider a collection with an index {x: 1} consisting of the following documents: [ {x : 5}, {x : 5}, {x : 5} ] The explain output on the query predicate {x : 5} shows that the total ...
0 votes
1 answer
51 views
How do I delete a key of an internal node of a B-Tree if it has children with the minimum number of keys?
I have this B-tree of order 5: If I want to delete the key 120, one source tells me that if both the children of the key have the minimum number of keys, then the children are merged into one node ...
1 vote
1 answer
178 views
How is the insert operation in a B-Tree O(log n), should it not be O( log 2d -1 ) where d is the degree of the B-Tree
A search operation in B-Tree can be O(logn) because we can perform a binary search on the key we are looking for at any node. When inserting a key in a B-Tree node which isn't full and is the leaf ...
0 votes
0 answers
78 views
How are B-tree and B+tree structures formed?
B+Tree, Data, applied B-Tree, applied B+Tree I want to know how the B-Tree and B+Tree structures are actually formed? Firstly, do we begin with a non-empty table of data of empty table of data when we ...
0 votes
1 answer
162 views
Is there a correlation between Index INLINE_SIZE and Index Column Data(String Type) in Apache Ignite?
Is there a correlation between Index INLINE_SIZE and Index Column Data(String Type) in Apache Ignite? In the following situation, when I insert data, an exception related to sorted index occurs, a ...
0 votes
1 answer
39 views
Issue solving 2-3 B-tree
I do not know how to delete the node 90 from this 2-3 B-tree and i cant put in a simulator because i would need to replicate the tree exactly and I do not know how to do that. I would really ...
1 vote
1 answer
126 views
Understanding Disk Reads and Cache Misses for B-tree and BST Queries
I am trying to understand how disk reads are handled when performing query operations on B-trees and have TWO questions. I have the following B-tree structure: [10, 20] / | ...
4 votes
1 answer
225 views
How to implement a non-preemptive splitting insert in a B-tree?
I am working on implementing a non-preemptive splitting insert function for a B-tree. Below is the structure of my B-tree node: #define KEYS_NUMBER 4 // Max number of keys in a ...
0 votes
1 answer
57 views
Complexity of a multi-column b-tree index
According to one of Sebastian Brestin's posts, a multi-column b-tree index will look like something below. It seems that more columns doesn't create a deeper b-tree. So if a single-column (n entries) ...
1 vote
1 answer
49 views
B-tree insertion problem, error: vector subscript out of range
I'm implementing a B-tree insert function. But it gets into problems. For inserting 50 elements and below it seems to work fine, but inserting 100 elements yields the error: vector subscript out of ...
0 votes
1 answer
126 views
Rust BTreeSet insert unique values with duplicate ranking field
I need an ordered set so I'm using BTreeSet. I have an Item struct which contains a unique id, and a rank field which may be duplicated. I only want uniqueness to be considered for the id field and ...
0 votes
1 answer
89 views
PostgreSQL - jsonb index is not being applied
I have a table called users that contains over 2 millions records with the following structure: create table users { id integer not null, langs jsonb } The column langs contains the following ...
0 votes
1 answer
371 views
Order of B+ Tree
Looking at different sources, it seems to me that there are two definitions to B+ tree order. The first one is talking about number of entries per node, where the second one is talking about the ...
0 votes
1 answer
92 views
Why do some btree diagrams have multiple nodes at the same level?
Why do some diagrams have no value for each node and instead have 2 values? What are they trying to represent? The second diagram makes sense if 8 has a left and right node of 6 and 7. I don't ...
0 votes
0 answers
108 views
Why does btreemap's iter not implement count?
I wonder about the Iterator for Iter implementation of BTreeMaps Iter: #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> ...