Black, Michael (IS) wrote:
> 3.7.4 doesn't indicate it will use an index in either case with like...but
> glob seems to call the index...why does glob use the
> index but like does not?
LIKE is case-insensitive by default, while GLOB is case-sensitive. Thus, LIKE
works
qlite.org] on
behalf of Black, Michael (IS) [michael.bla...@ngc.com]
Sent: Sunday, July 10, 2011 12:03 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] using index when using concatination
3.7.4 doesn't indicate it will use an index in either case with like...but glob
seems to call
AM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite] using index when using concatination
Baruch Burstein <bmburst...@gmail.com> wrote:
> I am using the following SQL statement for SQLite:
>
>select * from words where "word" like ? || '%' || ? ;
>
&g
Baruch Burstein wrote:
> I am using the following SQL statement for SQLite:
>
>select * from words where "word" like ? || '%' || ? ;
>
> In order to bind parameters to the first and last letters. I have tested
> this both with and without an index on the column `word`,
Igor Tandetnik wrote:
> Black, Michael (IS) wrote:
>> Any particular reason you can't build your own string and just pass one
>> parameter?
>>
>> select * from words where "word" like ?;
>
> That won't help - SQLite still can't use the index.
I
Black, Michael (IS) wrote:
> Any particular reason you can't build your own string and just pass one
> parameter?
>
> select * from words where "word" like ?;
That won't help - SQLite still can't use the index.
> And any reason why you don't create a 2nd field holds
Any particular reason you can't build your own string and just pass one
parameter?
select * from words where "word" like ?;
And any reason why you don't create a 2nd field holds the 1st and last char?
and index that? Then your query should be blazingly fast as it will actually
use the index
7 matches
Mail list logo