Filip,
I don't suppose it would fit your needs to index on the column you're
comparing rather than on "id" would it? That would cause the query
planner to use your indexes, I believe.
create index "i1" on "t" (uniqueID) where UniqueId ==55;
Alternatively, you can create an
Actually running ANALYZE didn't seem to help. There are other partial
indexes I tried and none of them were used:
sqlite> create index "i2" on "t" ("id") where "flags" & 1;
sqlite> explain query plan select * from "t" where "flags" & 1;
0|0|0|SCAN TABLE t
sqlite> create index "i3" on "t" ("id")
On 1/29/15, Filip Navara wrote:
> Hello,
>
> I tried really hard to get partial indexes working, but SQLite refuses to
> use them:
>
>> create table "t" ("id" INTEGER NOT NULL PRIMARY KEY, "flags" INTEGER,
> "uniqueId", "syncFolder" INTEGER);
>> create index "i1" on "t"
Hello,
I tried really hard to get partial indexes working, but SQLite refuses to
use them:
> create table "t" ("id" INTEGER NOT NULL PRIMARY KEY, "flags" INTEGER,
"uniqueId", "syncFolder" INTEGER);
> create index "i1" on "t" ("id") where "uniqueId" IS NULL;
> explain query plan select * from "t"
4 matches
Mail list logo