|
Posted by Damien on 10/19/06 16:03
jim.clifford@gm.com wrote:
> I have been using display execution plan (of query analyser). This is
> how I known if the task performed in 'top', 'sort', 'seek' and 'index
> scan'. These tasks I correlate with durations taken.
>
> So the questions still remain;
> Problem 1) Why is the smaller index only involving 'timestamp' not used
> when it's available and covers the details on the query involved ?
>
But it doesn't cover the details required (using the word cover as in
the phrase covering index), because it doesn't include all columns
which are included in the select list.
So becuase the optimiser know's it's going to have to go into the
clustered index anyway (especially with no where clause), it just uses
it instead.
> Problem 2) Why does the introduction of a simple computed column
> dis-able the optimiser?
>
> Regards JC.......
I don't believe the optimiser can break down a computed column to know
which underlying columns it is based upon. So it doesn't know that the
computed column is "covered" by a particular index. Of course, you can
index computed columns, and it might then use that index, if it was a
covering index.
Damien
Navigation:
[Reply to this message]
|