Timeline for Sort order specified in primary key, yet sorting is executed on SELECT
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 8, 2020 at 6:31 | history | edited | Aaron Bertrand | CC BY-SA 4.0 |
added 111 characters in body
|
Jun 14, 2012 at 18:18 | history | edited | Mike Sherrill 'Cat Recall' | CC BY-SA 3.0 |
Link to Usenet discussion including David Portas, Kalen Delaney, and Tibor Karaszi, among others.
|
Jun 13, 2012 at 17:29 | comment | added | m__ | I've moved this to a new question (off topic) | |
Jun 13, 2012 at 9:28 | comment | added | m__ | Maybe I'm just being stubborn (so please forgive me ;-)). Anyhow, I've read the blog post by Hugo Kornelis and it is pretty straight forward. However, in his example he is using one clustered index and one non-clustered, the non-clustered index is smaller in size and is thereby being used in the execution plan. In my case I have only one clustered index, can sql server still return the values in wrong order (it has no smaller index to use and full table scans are way too slow)? | |
Jun 13, 2012 at 7:08 | history | migrated | from stackoverflow.com (revisions) | ||
Jun 12, 2012 at 14:41 | comment | added | Mike Sherrill 'Cat Recall' | Well, earlier, the OP also said, "I would have thought that since I store the values sorted by the Date column, the sorting would not occure [sic]." So at least part of the problem is that misconception about what a clustered index does. I think it's good to straighten that out anyway. | |
Jun 12, 2012 at 14:04 | history | answered | Mike Sherrill 'Cat Recall' | CC BY-SA 3.0 |