Thank you Itzik for this excellent walk-through!
See my set-based solution in second part of this article.
1.5 seconds and 14 000 reads.
Hi Itzik. My solution uses 14000 reads and executes in about 1.5 seconds.
My solution is a variant of Relational Division; Ordered Relational Division.
DECLARE @Items INT = (SELECT...
The problem is just another Relational Division; Ordered Relational Division. My solution finishes in just 1.5 seconds and uses about 14000 reads.
DECLARE @Items INT = (...
Browse back issues of SQL Server Pro, from January 2007 through the last issue published in April 2014. Find the back issues here.
Get answers to questions, share tips, and engage with the SQL Server community in our Forums.
Sponsored Introduction Continue on to (or wait seconds) ×