"Andrea Galeazzi" <[email protected]> wrote in message news:[email protected] > Is the order of WHERE clauses important as C-language is?
No. The optimizer may, and often does, reorder the conditions in the WHERE clause. > For instance is > > SELECT title FROM tracks > WHERE title ((title=:last_title AND id>:last_id) AND LIKE %Mad% > > better than > > SELECT title FROM tracks > WHERE title LIKE %Mad% AND ((title=:last_title AND id>:last_id) > > ? Neither is better than the other: both are invalid and will produce a syntax error. > Anyway, can the index improve select performance in both previous > cases? No. These statements won't actually run, and are thus beyond help. Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

