You are here: Re: Learning about Indexes « MsSQL Server « IT news, forums, messages
Re: Learning about Indexes

Posted by Damien on 10/24/06 07:29

jim_geissman@countrywide.com wrote:
> Damien Wrote:
> > 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
> How can this be true? In this case, the computed column is simply
> a substring of one of the other columns that is already in the query,
> and is also included in the 3-item index. Is this really too hard for
> the
> optimizer?
>
In the *very specialised* situation where the computed column is the
leftmost n characters, then the index would be usable. But why should
the good people writing the optimizer spend time on that particular
condition? In all other substring situations (where you do not start at
the leftmost character), and for any more complex calculated columns
(remember, they can reference any of the columns), the index would be
useless.

And you always have the option, if you need an index to be considered,
of indexing the computed column.

Damien

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация