hard20 pts · first answer countswindow-functionssqlperformance
A slow filter on a window view
A view adds ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY ts). Filtering the view by customer_id is fast, but filtering by country is slow. Why?
Discussion 0
Join free to post in the discussion.