On Mon, Feb 25, 2013 at 9:46 AM, dd <[email protected]> wrote:
> Hi,
>
> Table has string data type column. format of strings:
> somedata1/somedata2/somedata3
>
> I have written query to search : select * from emp where column_test like
> "somedata/%";
>
> It gives perfomance as per articles in internet. Is it? If yes, what is
> alternate query for this?
>
The query might go faster if you do:
CREATE INDEX emp_idx1 ON emp(column_test COLLATE nocase);
Or, if you really intended to do a case-sensitive search, you could say:
SELECT * FROM emp WHERE column_test GLOB 'somedata/*';
>
> Thanks in advance.
>
> Best Regards,
> dd.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users