Note that I didn't say physical order, but rather physical access order. What I meant here is that the access depends on current data layout as well as optimization choices, both...
The article now contains the right link, which is: tsql.solidq.com/SampleDatabases/TSQLV4.zip.
Thanks for letting us know!
First, thanks for the feedback; it is much appreciated!
The val column shouldn’t be part of the key list of the clustered primary key. From a logical, data model...
Nice solution! I especially like its simplicity and brevity.
Not sure why my solution doesn't terminate on your machine. I just ran both yours and mine on my [6 year-old]...
Note: under certain conditions the solution can return degenerate intervals (where starttime = endtime). Those are of course meaningless when the interval is a closed-open interval like in our...