Solved

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

Posted on 2011-02-13
7
801 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 69

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 69

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 SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
partitioning database after decade growth 8 55
shrink table after huge delete 2 28
denied execute as 13 24
MSSQL Convert Char to Date Time 5 9
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.  …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup

740 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