List:General Discussion« Previous MessageNext Message »
From:Jon Frisby Date:June 11 2002 4:18am
Subject:RE: MySQL AB: Need documentation clarification
View as plain text  
> Indexes are only used if they significantly reduce the number of reads
> required vs a full table scan (I believe 30% is mysql's threshhold).
> An IS NOT NULL clause may very well use an index if almost all of the
> records have NULL in that particular field.  A != clause is a bit
> harder, since that basically devolves into "field < ## OR field > ##",
> and I don't think can optimize that.

In my circumstance, over 90% of the rows have a NULL in the relevant column,
so IS NOT NULL should definitely be using the index.

-JF

Thread
MySQL AB: Need documentation clarificationErv Young11 Jun
  • Re: MySQL AB: Need documentation clarificationDan Nelson11 Jun
    • RE: MySQL AB: Need documentation clarificationJon Frisby11 Jun
Re: MySQL AB: Need documentation clarificationHeikki Tuuri11 Jun
Re: MySQL AB: Need documentation clarificationHeikki Tuuri11 Jun
Re: MySQL AB: Need documentation clarificationJeff Kilbride12 Jun
  • Re: MySQL AB: Need documentation clarificationJeremy Zawodny1 Jul