jeudi 28 mai 2015

Partial index in sqlite

I've got next query to index:

select * from table where column_a like %something% and column_b is null;

And this is how I create an index:

create index test_index on table(column_a COLLATE NOCASE) where column_b is null;

Am I right? Should I containt column_b in on table(column_a COLLATE NOCASE) statement?

Aucun commentaire:

Enregistrer un commentaire