android - SQLite FTS3 simulate LIKE somestring% -


i'm writing dictionary app , need usual word suggesting while typing.

like somestring% rather slow (~1300ms on ~100k row table) i've turned fts3.

problem is, haven't found sane way search beginning of string.
i'm performing query

select word, offsets(entries) entries word match '"chicken *"'; 

, parse offsets string in code.

are there better options?

yes, make sure set index on field word , use

word >= 'chicken ' , word < 'chicken z' 

instead of or match or glob


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -