Explore Library
Quiz

Window Functions and Query Performance

Understand how ORDER BY in a window and matching indexes affect performance of window functions.

You run SELECT id, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date) FROM orders. Which factor most helps this window function avoid an expensive sort step at execution time?