β Backend PythonQuestion 33 of 49
What is the left-prefix rule for composite indexes?
π Explanation
The left-prefix rule means a composite index is efficiently used only when the query filters on its leading column(s), in the order they appear in the index. The other options incorrectly describe alphabetical ordering, requiring all columns, or prioritizing the rightmost columns.
Related questions
- Why might an index not be used when most rows match the condition?
- What is a composite index and when would you use one instead of single-column indexes?
- What is the difference between ANALYZE and VACUUM ANALYZE in PostgreSQL?
- What are partial indexes and functional indexes, and what problems do they solve?
- Why might a query using LOWER(email) not use an index on email?
β PreviousNo login needed