Skip to content

Which column goes first

There is one composite index on (college_id, created_at).

Which of these queries can use it to seek directly rather than scan?

sql -- A: WHERE college_id = 7 -- B: WHERE created_at > '2026-01-01' -- C: WHERE college_id = 7 AND created_at > '2026-01-01'