Olivier Mascia wrote:
> So I should probably even better go with:
> create index ... where NAME is not NULL;
> as my only queries involving NAME have a 'where NAME is not NULL' restriction.
To be sure, check with EXPLAIN QUERY PLAN whether the index is actually used.
> select NAME,count(NAME) from SHEETS group by NAME having SHEET>? and NAME is
> not NULL;
The SHEET value is from some random row in the group, and the NAME value is
the same for all rows in the group. Are you sure you do not want to use WHERE
instead of HAVING?
sqlite-users mailing list