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.
Sign in to answer questions and track your progress
Sign In