Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-13
7
Medium Priority
?
815 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 300 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 71

Assisted Solution

by:Qlemo
Qlemo earned 1700 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 71

Accepted Solution

by:
Qlemo earned 1700 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

885 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