Skip to content
RED SAG Skills
medium10 pts · first answer countsindexingquery-tuning

Feed page per user

This query runs for every page view of a user's order history. Which index lets it stop after reading 20 entries?

SELECT * FROM orders
WHERE user_id = $1
ORDER BY created_at DESC
LIMIT 20;
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions