Skip to content
RED SAG Skills
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?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions