The Beatles versus the Stones
23 Comments
Here’s a nice brain teaser, just before the end of the year. Despite the title, it is related to SQL Server, not to music! A common misconception amongst SQL Server users is that a clustered index on a table will ensure that data is returned in the order implied by that index. I have lost count of the number of times I had to disprove this notion. Of course, there are many cases where the rows returned by a query will be in the order of the clustered index. Here’s a quick illustration, using the lineup that The…