As I see LIKE operator can optimize query if I switch PRAGMA case_sensitive_like=ON. I measured, it really worked, queries "LIKE someth%" becomes ten times faster on a compartively large binary indexed tables. But the problem is that my library implemented as an add-on to my application, it maintains its own tables with any db it is connected. So the problems are
- I can not read case_sensitive_like since it is only supported to be set, not read. So I can not temporarily read the state and return it after the query,
- As an addon that should obey the main functionality of the db, I should not change the setting to my need for good since it can affect other routines.
- As I see there's no Like(case-sensitive) internal equivalent for me to call optimizid query directly. For example use LIKECASESENSITIVE instead of LIKE
- I can call sqlite3_create_function, but I don't know whether or not I can call LIKE(CASE SENSITIVE) internally.