Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLcomposite and partial indexesSingle-choice MCQ

A composite B-tree index exists on (tenant_id, created_at). Which of these queries can use this index to avoid a full sort, NOT just to filter rows?

-- index: CREATE INDEX ON events (tenant_id, created_at); -- Candidate query: SELECT * FROM events WHERE tenant_id = 42 ORDER BY created_at DESC LIMIT 20;