Solved

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

Posted on 2011-02-13
7
782 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

746 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

13 Experts available now in Live!

Get 1:1 Help Now