Hello!

В сообщении от Wednesday 19 November 2008 15:05:01 D. Richard Hipp написал(а):
> That's because "SELECT count(*) FROM t" has to read and count every  
> row in the table - all 1.2 million rows.  And this involves reading  
> all 1.2 million rows from disk.  If each row is 100 bytes in size,  
> that involves reading 120MB.

Is it possible using only PRIMARY KEY index for select count(*) queries? For 
other indexes it's possible as

explain query plan select count(*) from street where code >= '77000000000' and 
code < '77000000000'+1;
0|0|TABLE street WITH INDEX street_code_idx


Best regards, Alexey.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to