On 17 Mar 2017, at 10:20am, Rob Willett <rob.sql...@robertwillett.com> wrote:

> CREATE INDEX "Disruptions_idx4" ON Disruptions ("status" COLLATE NOCASE ASC);
> […]
> As part of the larger more complex query, we are executing the query
> ```
> select * from Disruptions where status = 2 OR status = 6;

The schema for the table says that "status" is INTEGER.
You are supplying numbers as arguments.
Those two match and should create no problem.

But your index has a collation order which is usually used for text.  I don’t 
see that it is obviously wrong, but it does look a little weird.

Try creating another index which is just on "status", without the COLLATE 
Then do another ANALYZE, then try the SELECT again.

sqlite-users mailing list

Reply via email to