Questions tagged [b-tree-index]
57 questions
1
vote
1 answer
What is Minimum Occupancy in B-Trees?
I'm fairly new to the B-Tree concept, I'm currently reading slides for a course that can be found here:
http://www-db.deis.unibo.it/courses/TBD/Lezioni/02%20-%20Indices.pdf
I read that B-trees have a "minimum occupancy" of 50%.
What does that mean?…

mmarc
- 11
- 2
1
vote
1 answer
postgresql doesn't use index for primary key = foreign key
I have 3 main tables,
ts_entity(id,short_name,name,type_id)
ts_entry_entity(id,entity_id,entry_id)
ts_entry(id, ... other columns ...)
All the id columns are UUID, and have a Btree index.
ts_entry_entity.entity_id has foreign key to ts_entity.id,…

Abner
- 23
- 6
1
vote
0 answers
How does oracle indexes manage and maintain B-Tree Indexing for columns with dynamically changing data?
I am wondering how Oracle [or any other database] manages and maintains B-Tree indexing for columns with dynamically changing data.
Suppose I have a table with the following columns:
Now if I have indexing on (Status) [which does not make much…

dpk
- 11
- 3
1
vote
1 answer
Traversing B-Tree Structure Algorithm
I'm having a hard time trying to write a traversing function that outputs a child-node's parent-nodes.
Take a look at the example b-tree
Here is the sample dataset I'm using:
$nodes = array(
array('f','b'),
array('f','g'),
array('b','a'),
…
user7892649
1
vote
3 answers
Key-value store by foldername
We have our in houses noSQL db, that basically store everything in a compact binary file. Now, I need a data structure similar to key-value store or B+Tree. The issue is 'value' in my case can be of different types, and of size very volatile, could…

ctNGUYEN
- 241
- 2
- 6
1
vote
0 answers
MySQL - Using PRIMARY KEY - UNIQUE INDEX related table many to many
happy day.
I am creating a database of movies, all movies will receive one vote for each user, valuing as it seemed the movie, "Good, good or fair" These votes of these stored in a table [movies_has_rating] that have the ID of the user who made the…

Learning and sharing
- 1,378
- 3
- 25
- 45
1
vote
1 answer
Boolean column in index and filter sections of explain in postgres
I have a table with boolean column - "is_woman" bool DEFAULT true
I have an btree index with this column (and some others like age, town and so on) - is_woman ASC NULLS LAST
I have a query with this column - is_woman IS FALSE
As a result I get an…

Anton
- 56
- 3
- 6
1
vote
3 answers
Databases and B+Trees indexes
Where can I find information on whether which databases are using B+Trees over B-Trees for their index implementations?
Oracle appears to be using B+Trees. Although they don't describe it on their documentation, their graphics appear to be pointing…

Pablo Santa Cruz
- 176,835
- 32
- 241
- 292
1
vote
1 answer
GEO2D indexes for search by two ranges of date (timeseries)
I am doing a kind of room reservation system where a collection is containing documents which contains two dates : a begin date and an end date.
I would like to be able to find all the reservation which begin date is between two dates and end date…

scoulomb
- 630
- 2
- 7
- 19
1
vote
0 answers
Cost of JOIN with indices
Given the following:
blocksize = 4K
relation students(S#, Sname, Age,....)
relation taken(S#, C#, Grade)
Number of student records = 10,000
Number of taken records = 50,000
Size of student records = 200 bytes
Size of taken records = 50 bytes
If…

Shay Zilberman
- 11
- 1
1
vote
1 answer
Binary Search Tree Generation from increasing index
I have a vector of parent pointers [ 0 1 1 2 2 3 3 5 5 ....] which is basically a binary tree. The index is the child and the corresponding value represents the index of its parent in the same vector.
e.g: in the above vector, if you count to index…

Wajahat
- 453
- 5
- 8
0
votes
2 answers
Why in B-tree and B+_tree store from half-full to complete-full in each non-leaf node
I've just learn B-tree and B+-tree in DBMS.
I don't understand why a non-leaf node in tree has between [n/2] and n children, when n is fix for particular tree.
Why is that? and advantage of that?
Thanks !

kju
- 146
- 10
0
votes
1 answer
why at depth 2, a B+ tree of order 2 has a MAXIMUM of 5*5*4 = 100 item?
when I learned B+ tree knowledge , I saw this article, but I don't quite understand how this 100 is calculated. can anyone help explain?

bootstrap2025
- 63
- 5
0
votes
0 answers
Speed up b-tree
I wrote a simple implementation of a b-tree, and the problem is that it is too slow (tl9 on codeforces). What should i change to speed up this tree?
The memory limit problem can be easily fixed by increasing the constant b, but then there are time…

niripsa
- 1
- 1
0
votes
1 answer
How to apply the index line "my_table_" btree () to a table?
I am managing a postgres db created by third parts.
One of the tables is described as
\d my_table;
Table "my_table"
...
Indexes:
"my_table_pkey" PRIMARY KEY, btree (dt, ida, idm, idd, idt, idr)
"my_table_fa" btree (dt, idd, idt, idfa,…

Tms91
- 3,456
- 6
- 40
- 74