Answered step by step
Verified Expert Solution
Question
1 Approved Answer
select * from weather where city = Edmonton and temp < - 3 0 Suppose B + - tree indexes are constructed on columns city
select from weather where city "Edmonton" and temp
Suppose Btree indexes are constructed on columns city and temp. Data entries are stored in both indexes as keyrid,pid where rid is the record id of a data record with key value k and pid is the address of a page where the record with id rid is stored. Further assume of the tuples satisfy the predicate "city'Edmonton'", of the tuples satisfy the predicate "temp and of the tuples satisfy both predicates.
a What would be an efficient algorithm to evaluate the query if we know that the index on city is clustered?
b What would be an efficient algorithm to evaluate the query if we know that none of the indexes are clustered?
c Suppose each page of the index leaf and nonleaf stores up to keys, and each data page stores up to records. Assume both index and data pages are full. If N denotes the number of data records, estimate the number of page accesses for both algorithms given in a and b
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started