> 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 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php