Spiros Ioannou <[EMAIL PROTECTED]> wrote: > John Stanton wrote: > > Sqlite does cater for text searching. Look at FTS. > > This is not text searching. No stemming, etc etc is required. Column has > exactly 1 word, and the 'LIKE' substring matching is performed at the > words' first characters (not end-characters). > Thanks,
Index the column and use GLOB with a trailing '*' instead of LIKE with a trailing '%'. Make the search string a single string literal token in the SQL: SELECT * FROM table WHERE xyz GLOB 'abc*'; Do not use an expression for 'abc*'. Do not use bound parameters for 'abc*'. Make it a literal string within the SQL. If you do these things, then SQLite will use an index to do the search and it will be very fast. Way faster than fgrep. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------