medium10 pts · first answer countswindow-functionssqlperformance
Speeding up a ranking query
A PostgreSQL query ranks orders with ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY created_at DESC) and spends most of its time sorting. Which index can help?
Discussion 0
Join free to post in the discussion.