0% found this document useful (0 votes)
2 views104 pages

Query Processing and Join Cost Analysis

The document discusses query processing, specifically focusing on join operations between two datasets, A and B. It outlines calculations related to student enrollments and the average number of students per course, emphasizing the need to access multiple pages for certain entries. The document also notes that tuple costs are not included in the total cost calculations for the joins.

Uploaded by

billyzhcheng
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views104 pages

Query Processing and Join Cost Analysis

The document discusses query processing, specifically focusing on join operations between two datasets, A and B. It outlines calculations related to student enrollments and the average number of students per course, emphasizing the need to access multiple pages for certain entries. The document also notes that tuple costs are not included in the total cost calculations for the joins.

Uploaded by

billyzhcheng
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Query Processing

Example

Join

A B
Why do we not count the output cost?
Assume: Equal number
of students in each
course
Calculations
• Number of enrollments = 60,000*10
• Number of courses = 100
• Average number of students in a course = 6000

• Number of pages with CS4320 = 60


Note: Each of CS4320 entry can be present in a different page

This means we may have to visit 6000 pages to access all CS4320 entries
Outer loop Inner loop

Join

A B
Outer loop Inner loop

Join

A B
Total cost = 1
Outer loop Inner loop

Join

A B
Total cost = 2
Outer loop Inner loop

A B
Total cost = 3
Outer loop Inner loop

A B
Total cost = 4
Outer loop Inner loop

A B
Total cost = 4 + Same cost for page 2 of A and page 3 of A
Tuple cost is not counted here

You might also like