Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given the following information: The table Dog has attributes id, breed, name, and age; all are string fields of the same length. The

You are given the following information:

The table Dog has attributes id, breed, name, and age; all are string fields of the same length.

The id attribute is a candidate key.

The relation contains 10,000 pages and each page has 100 tuples.

The indices indicated below are in memory.

You can assume that the size of RID pointers in the index is ignorable.

Consider the following query: SELECT D.breed, D.id FROM Dog D WHERE D.breed=Poodle; Assume that only 5% of Dog tuples meet the selection condition.

(a) Suppose that a clustered B+ tree index on breed is the only index available. Describe the possible query plans (if any) under Alternatives 1 and 2 and their costs. Compare the two. Does using indexing help? (b) Suppose that an unclustered B+ tree index on breed is the only index available. Describe the possible query plans (if any) under Alternatives 1 and 2 and their costs. Compare the two. Does using indexing help? (c) Suppose that a clustered B+ tree index on (D.id, D.breed) is the only index available. Describe the best query plan and its cost.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions