Exercise solution 4.6

Moderator: Datenbanken 2

ds72tuqu
Erstie
Erstie
Beiträge: 11
Registriert: 14. Okt 2014 19:31

Exercise solution 4.6

Beitrag von ds72tuqu » 20. Mär 2015 09:32

Hi,
can any one explain why in a) for B+ tree lookup of un-clustered B+ tree this equation came -> 2+10,000 pages * (20bytes / 100bytes) * 0.1

similarly in b) for B+ tree lookup of clustered B+ tree -> 2 + 10,000 * 0.4 * 0.1 + 10,000 pages * 0.1

I suppose the term '2' is for number of levels in the tree...

Thanks,

bullson
Neuling
Neuling
Beiträge: 1
Registriert: 13. Jul 2013 10:33

Re: Exercise solution 4.6

Beitrag von bullson » 24. Mär 2015 10:46

Hi,

i understood it this way(NO GUARANTEE, i did not participate in the exercise):
At first u look at the index: root + 1st level = costs of 2
then u look at the leaf-nodes, thats 10.000 * (20bytes / 100bytes) pages, since a index-entry has a size of 20 bytes, whereas a tuple has 100 bytes.
Of these pages u need to look at just 10 Percent, so u multiply it by 0.1.
Then u got the pointers to the actual data-records, which u want to access in a second step.
Since the B+ tree is unclustered in a), u will probably have to access a new data-page per pointer to a record.
And therefore u have to access 0.1 * 10.000 pages * 20 data-records.

Antworten

Zurück zu „Datenbanken 2“