CS FundamentalsModerateHCL · Tech Mahindra pattern
Which statement about a clustered index is correct?
- A. A clustered index never speeds up range queries
- B. A table can have any number of clustered indexes
- C. A clustered index must be on a non-key column
- D. A table can have at most one clustered index, because the rows can be physically ordered in only one way
Correct answer: D. A table can have at most one clustered index, because the rows can be physically ordered in only one way
A clustered index fixes the physical order of rows (or leaf pages) by its key, so only one is possible. Range queries benefit most, since matching rows are stored together.
More DBMS and SQL questions
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- Transaction T2 reads a value that T1 has written but not yet committed; T1 later rolls back. What is this anomaly called?
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- A candidate key is best described as:
- In an ER diagram, entity sets Student and Course are related by a many-to-many relationship Enrols that has an attribute grade. What is…
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…