>>Is this because the column ORDER_NO is the primary key?
>
>Imagine you have your table (data file) like this:
>REC_ID, ORDER_NO, ....
>
>and your index is on REC_ID so the index file is
>REC_ID
>
>then SQL server needs to read two files, first it reads the index to answer the "which records" question, getting a pointer to the data table, from where it reads the ORDER_NO field, but if in your index file, in the "Tag" REC_ID you already have the ORDER_NO value, then there is no need to go and read the data file. as the index file is acting as both index and data (ORDER_NO does not participate on the record selection at all, it is just a copy of the data included in the index). Of course then you need to ponder speed vs space, as you are essentially duplicating your data
Thank you for the explanation. I will have to think about what order would work better, REC_ID, ORDER_NO or ORDER_NO, REC_ID. I suppose that execution plan would show me.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham