Re: Is Not Null and Query Optimization



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,
.



Relevant Pages

  • Re: Is Not Null and Query Optimization
    ... If it is a determent to the effectiveness of the query, ... Roy Harvey ...
    (comp.databases.ms-sqlserver)
  • Is Not Null and Query Optimization
    ... How does the phrase "Is Not Null" in the where clause effect the ... If it is a determent to the effectiveness of the query, ...
    (comp.databases.ms-sqlserver)
  • Re: Index chosen dependant on result columns
    ... Index hints can be put into a query but they are ... using them unless the optimizer is coming up with incorrect estimates, ... rows for each inequality overlap. ... Your nonclustered index on B,C is like a table that contains ...
    (microsoft.public.sqlserver.programming)
  • Re: Repost: OpenForm Does Not Update Embedded Query
    ... You should not call Me.Refresh neither Me.Requery in the procedure answering to the Open event since the data is already 'fresh' and up to date at that point. ... The Optimizer repopulates a column in a table call Solution. ... That is called polling, and is not considered to be very user friendly, since each 1000 msec, it will refresh your form Solution. ... An update query necessary updates the tables, or it fails. ...
    (microsoft.public.access.modulesdaovba)
  • Re: [Info-Ingres] To order by, or NOT to order by
    ... [Info-Ingres] To order by, ... but then dropped the -zs flag altogether when there were no changes in the QEP. ... the best QEP but I guess the optimizer in 2.6/604 is a bit different. ... QEPs with a sample query ...
    (comp.databases.ingres)