>sqlite> Explain query plan select ID from Tbl where ID is null order by ID; >selectid|order|from|detail >0|0|0|SCAN TABLE Tbl
Luuk, I’m also using 3.21. Presumably if you give your Tbl a secondary index XXX then the explain query plan will match mine (SCAN TABLE Tbl USING COVERING INDEX XXX). Your example muddies the water further though. Why is it scanning an entire table when it could scan the pk? >> 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 his >post... I wasn’t specifically replying to your post, I just clicked reply to the latest reply. I don’t see where Cezary explains it though. _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

