SELECT count(column) slower than SELECT * SELECT count(column) slower than SELECT * sqlite sqlite

SELECT count(column) slower than SELECT *


So, as it turned out, there is no difference between these two queries - thus, there is no question at all.

Speaking of the overall timing - apparently you have to move from a toy-database to a real one.


I imagine that it would be a case of it having to keep memory of the ids that have already been accounted for and also needs to check for NULL entries.

If you haven't already, I'd suggest adding an index on your some_column to speed that up too.


The whole problem has been due to caching. The first request it had to fetch data from server and second request there was no need to.

Re run both codes interchanging both queries or running it multiple times and you will know that there is no difference.