3 OODBMS_sharing, p.1

ADBMS formulas

  1. Basic Cost Estimation:

    (where b is the number of block transfers, is the time to transfer one block, S is the number of seeks, and is the time for one seek)

  2. Linear Search (A1) - General Case:

    Cost = (where is the number of blocks in relation r)

  3. Linear Search (A1) - Selection on Key Attribute:

    Cost =

  4. Primary Index, Equality on Key (A2):

    Cost = (where is the height of the index)

  5. Primary Index, Equality on Nonkey (A3):

    Cost = (where b is the number of blocks containing matching records)

  6. Secondary Index, Equality on Nonkey (A4) - Single Record (Candidate Key):

    Cost =

  7. Secondary Index, Equality on Nonkey (A4) - Multiple Records:

    Cost = (where n is the number of matching records)

  8. Number of Merge Passes (External Sort-Merge):

    (where M is memory size, is buffer block per run and blocks for relation r)

  9. Total Block Transfers (External Sort-Merge):

  10. Total Number of Seeks (External Sort-Merge):

  11. Nested-Loop Join (Worst Case Block Transfers):

    (where is the number of tuples in r, is the number of blocks in s, and is number of blocks in r)

  12. Nested-Loop Join (Worst Case Seeks):

  13. Nested-Loop Join (Smaller Relation in Memory):

    (block transfers and 2 seeks)

  14. Block Nested-Loop Join (Worst Case):

    (block transfers) + (seeks)

  15. Block Nested-Loop Join (Best Case):

    (block transfers) + 2 (seeks)

  16. Improved Block Nested-Loop Join:

    Cost = (block transfers) + (seeks)

  17. Indexed Nested-Loop Join:

    Cost = (where c is the cost of traversing the index and fetching matching tuples)

  18. Merge-Join Cost:

    (block transfers) + (seeks) + (cost of sorting if relations are unsorted)

  19. Hash function mapping

    maps values to

  20. Partitioning tuples Each tuple is put in partition where . Each tuple is put in partition , where .

  21. Number of Partitions (Hash-Join, Fudge Factor):

    (where f is a fudge factor, typically around 1.2)

  22. Number of Passes for Recursive Partitioning (Hash-Join):

  23. Cost of Hash-Join (No Recursive Partitioning):

    (block transfers) + (seeks)

  24. Cost of Hash-Join (With Recursive Partitioning):

    (block transfers) + (seeks)

  25. Cost of Hash-Join (Build Input in Memory):

  26. B+-Tree Properties (Children): 1. Each node that is not a root or a leaf has between and children.

  27. B+-Tree Properties (Leaf Node Values): 1. A leaf node has between and values.

  28. B+-Tree Properties (Root - Non-Leaf): 1. If the root is not a leaf, it has at least 2 children.

  29. B+-Tree Properties (Root - Leaf): 1. If the root is a leaf, it can have between 0 and values.

Link to original

[[8. Query Processing.pdf#page=24&rect=58,141,533,626|]]

8. Query Processing, p.4

Questions

15, p.1

15, p.2

15, p.2

15, p.3

15, p.4

15, p.4

15, p.8

16, p.4

16, p.5

8. Query Processing, p.10

23, p.1

23, p.2

23, p.4

ADBMS Parellel Database, p.9