Which Ones Use The Index

CREATE INDEX orders_user_time ON orders (user_id, ordered_at);

user_id is integer and ordered_at is timestamptz. There is no other index on orders besides the primary key on id.

Select every query below that orders_user_time can serve without scanning or sorting the whole table. More than one is correct.

A

SELECT * FROM orders ORDER BY ordered_at DESC LIMIT 10;

B

SELECT * FROM orders WHERE ordered_at >= DATE '2026-01-01';

C

SELECT * FROM orders ORDER BY user_id, ordered_at LIMIT 10;

D

SELECT * FROM orders WHERE user_id = 7;

E

SELECT * FROM orders WHERE user_id = 7 AND ordered_at >= DATE '2026-01-01';

F

SELECT * FROM orders WHERE user_id::text = '7';