Solved

How many Leaf nodes can each Branch node in a b-tree index have?

Posted on 2011-02-13
7
793 Views
Last Modified: 2012-05-11
How many Leaf nodes can each Branch node in a b-tree index have?
0
Comment
Question by:Mr_Shaw
  • 3
  • 2
  • 2
7 Comments
 
LVL 37

Assisted Solution

by:momi_sabag
momi_sabag earned 75 total points
ID: 34882589
it depends on the index page size and the key size
you can find calculations that give a result for such a question but it is a bit different for every database
0
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 425 total points
ID: 34882696
In theory:
sizeof(page) / (sizeof(key) + sizeof(row address))
However, there might be a compression (removing "common" leading parts of the key for all leaf references), a "keep-free" setting which enforces to page to be split, and some factors more. There is no complete answer because it is an implementation detail, as momi_sabag wrote already.
0
 

Author Comment

by:Mr_Shaw
ID: 34882712
does it also depend on how much data you can squeeze into a 8k page?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 68

Accepted Solution

by:
Qlemo earned 425 total points
ID: 34882770
1. You can change the page size, so 8k is not always to be assumed
2. It does not depend on data, only on keys.

Exception for 2: A MSSQL Clustered Index contains the complete data, not only the keys. A Clustered Index is reorganizing the physical table data. Other index types do not, they are just additional "pointer" files, and hence only containing key data.
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 34882869
which database are you using?
0
 

Author Comment

by:Mr_Shaw
ID: 34883684
sql  2005
0
 

Author Closing Comment

by:Mr_Shaw
ID: 34894884
thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now