"Jim Wilcoxson" <[email protected]> wrote in message news:[email protected] > I don't know if it makes any difference, but is that where clause the > same as: > > WHERE name< 'zUmM' OR (name= 'zUmM' AND S.id< 8122)
SQLite's optimizer cannot use an index for any condition involving OR. That's why it's common to write an equivalent but somewhat unnatural name <= 'zUmM' AND (name< 'zUmM' OR S.id< 8122) This way, at least the first condition has a chance of being satisfied with an index. Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

