Question 21
EasyWhich query benefits most from an index on the email column of a users table?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
Which query benefits most from an index on the email column of a users table?
SELECT * FROM users
SELECT COUNT(*) FROM users
DELETE FROM users
SELECT * FROM users WHERE email = '[email protected]'
Sign up free to see the answer and a step-by-step explanation.
What is the selectivity of an index?
The speed of the disk
The number of tables indexed
The colour of the index
How well it narrows down rows: the proportion of distinct values in the indexed column
Sign up free to see the answer and a step-by-step explanation.
What is a multilevel index?
An index on several tables
An index stored on several disks
An index built on top of another index to reduce the number of blocks searched
An index with several passwords
Sign up free to see the answer and a step-by-step explanation.
What is the search key of an index?
The attribute or attributes used to look up records
The first row of the table
The primary key of the database
The password of the index
Sign up free to see the answer and a step-by-step explanation.
Why is a B+ tree index usually only a few levels deep even for millions of rows?
It skips most rows
It stores only a few rows
Each node holds many keys (a high fan-out)
It is kept in the CPU
Sign up free to see the answer and a step-by-step explanation.
Which condition usually prevents an ordinary index on 'name' from being used?
WHERE name > 'K'
WHERE name LIKE 'Kum%'
WHERE name LIKE '%kumar'
WHERE name = 'Kumar'
Sign up free to see the answer and a step-by-step explanation.
In hashing, what is open addressing?
Opening every bucket at once
Using a new disk for each record
Making the database public
Resolving a collision by placing the record in another free slot found by probing
Sign up free to see the answer and a step-by-step explanation.
In a B+ tree, where are the actual data pointers (or records) stored?
In a separate linked list only
Only in the leaf nodes
Only in the root
In every node
Sign up free to see the answer and a step-by-step explanation.
A composite index exists on (city, age). Which query can use it most effectively?
WHERE name = 'Ravi'
WHERE age > 25
WHERE city = 'Pune' AND age > 25
WHERE age = 30 OR name = 'Ravi'
Sign up free to see the answer and a step-by-step explanation.
What is a dense index?
An index with no pointers
An index with an entry for every search-key value in the file
An index stored in memory
An index with entries for only some values
Sign up free to see the answer and a step-by-step explanation.