You are here: Re: Is Not Null and Query Optimization « MsSQL Server « IT news, forums, messages
Re: Is Not Null and Query Optimization

Posted by Gert-Jan Strik on 06/28/07 19:43

Are you sure this is the question you want to ask?

The "Is Not Null" is treated as a requirement, and will force the
optimizer to choose a query plan that will eliminate all NULL rows.

If you want to know about the effects on efficiency, well, the use of
"Is Not Null" in and of itself does not negate the use of indexes. In
other words (and somewhat simplified): if most rows are NULL and a few
rows are NOT NULL, and you have an index on this column, then the
optimizer will most likely use the index.

HTH,
Gert-Jan


db55 wrote:
>
> How does the phrase "Is Not Null" in the where clause effect the
> effectiveness of a query?
>
> If it is a determent to the effectiveness of the query, how do you
> work around it?
>
> Thanks,

 

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

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