On 06-01-18 10:44, x wrote:
> Thanks for the replies.
> While I’m now on board as to what a NULL is I’m still a bit puzzled by the
> query planner.
> Explain query plan select ID from Tbl where ID is null order by ID;
> SCAN TABLE Tbl USING COVERING INDEX ...
I do see different things:
SQLite 3.21.0 2017-10-24 18:55:49
sqlite> .schema tbl
CREATE TABLE tbl (id integer primary key not null);
sqlite> select count(*) from tbl;
sqlite> Explain query plan select ID from Tbl where ID is null order by ID;
0|0|0|SCAN TABLE Tbl
> It doesn’t even use the ID pk despite the fact it’s the requested order by??
That is explained by Cezary, if the explanation was unclear answer to
sqlite-users mailing list