Question: A census table contains data from the 2020 census with one row for each person in the US including their gender, occupation, age. There are

A census table contains data from the 2020 census with one row for each person in the US including their gender, occupation, age.

There are an index on the gender column, one on the age column, and one on the occupation column.

For the query

select  from census where gender='F' and occupation='CEO' and age<55

which index would give the better performance?


A. Use the index on age and scan the rows from the index for gender and occupation.

B Since no one index can answer the query, do a linear scan of the table.

C. Use the index on gender and then scan the rows from the index for age and occupation

D. Use the index on occupation and then scan the rows from the index for gender and age.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The best index for the given query would be the one that allows the most efficient filtering of rows ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!