Jan Slodicka wrote: > Sqlite LIKE optimization is described as follows: > A like pattern of the form "x LIKE 'abc%'" is changed into constraints > "x>='abc' AND x<'abd' AND x LIKE 'abc%'" > > If you look into sqlite code, then the string "abd" is generated from "abc" > using a trivial algebra. > > However, this algebra won't work on a custom collation.
<http://www.sqlite.org/optoverview.html#like_opt> says: | Terms that are composed of the LIKE or GLOB operator can sometimes be | used to constrain indices. There are many conditions on this use: | [...] | 6. For the LIKE operator, if case_sensitive_like mode is enabled then | the column must indexed using BINARY collating sequence, or if | case_sensitive_like mode is disabled then the column must indexed | using built-in NOCASE collating sequence. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users