Re: Is Not Null and Query Optimization
- From: Gert-Jan Strik <sorry@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jun 2007 21:43:27 +0200
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,
- References:
- Is Not Null and Query Optimization
- From: db55
- Is Not Null and Query Optimization
- Prev by Date: Re: Performance between Standard Join and Inner Join
- Next by Date: question about a query
- Previous by thread: Re: Is Not Null and Query Optimization
- Next by thread: Re: Is Not Null and Query Optimization
- Index(es):
Relevant Pages
|