| Tibor Karaszi 2006-10-24, 6:30 pm |
| > I think I've got it.... Are you saying then that some indexes are used
> for joining tables, and others are used for retrieving the eventual
> display data?
No, that was not what I was trying to say. It is not really that simple. If you want to get into
this subject, you need to learn to read execution plans. Sometimes, a filter (WHERE) is performed
before the JOIN operation, sometimes not. It depends on so many factors what execution plan you end
up with. Start with simpler queries, read the query and try to understand what the element in the
execution plan are doing and map them to the elements in your queries.
I tried to describe the concept of a covering index in my earlier reply, but not having English as
native language, the description might not be the best. I suggest you read in Books Online and also
Google on "covering index" etc...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
"plokolp" <rod.weir@gmail.com> wrote in message
news:1158910542.314246.292860@i3g2000cwc.googlegroups.com...
> Thanks for responding Tibor.
>
> I think I've got it.... Are you saying then that some indexes are used
> for joining tables, and others are used for retrieving the eventual
> display data?
>
> The SQL I am analyzing selects from a series of nested views. View
> within views etc. Perhaps a NC index is good for joining these views
> together, but the CL index is for if and when the eventual data is
> displayed?
>
> ...am I barking up the wrong tree here?
>
> Many thanks,
>
> Rod.
>
> Tibor Karaszi wrote:
>
|