Question
1. Consider the relation r (Key, Name, Address). The relation takes 100 blocks on disk and holds 10000 tuples. a. What is the selectivity of
1. Consider the relation r (Key, Name, Address). The relation takes 100 blocks on disk and holds 10000 tuples.
a. What is the selectivity of an equality predicate on Key?
b. Given a secondary IndexName (height = 3) and a range predicate on Name with selectivity of 0.02, estimate the cost of doing the lookup on A.
c. Given a clustered IndexName (height = 2) and a range predicate on Name with selectivity of 0.02, estimate the cost of doing the lookup on A.
d. Given a predicate PA with selectivity of 0.3 and a predicate PB with a selectivity of 0.5, what are the selectivities of:
(NOTE: you just need to compute the selectivity value, you do not need to estimate any costs in this part. You will have to make some assumptions about correlation between PA and PB)
- NOT PA
- PA AND PB
- PA OR PB
- PA AND (NOT PB)
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