At 07:41 6-1-2004 -0800, Buzz Weetman wrote:
I'm using sqlite in an embedded system. Disk I/O is relatively slow. I am doing a:
SELECT count(*) FROM my_table;


This is taking too much time. I've also tried count(1), as I saw suggested elsewhere in the mail list... though I'm not entirely sure what this means. 1st column? I've tried a column that I have an index for... not faster.

Doesn't sqlite "know" the number of rows in each table without explicitly counting them?

Thanks for any help
Buzz

The count function takes a column or a constant as an argument. I posted the count(1) some days ago. I used this in
Oracle sql years ago. The idea was to make the query faster as it did not need to scan the columns in the table.


groet,
Hennie
==================================================
Linux is like a wigwam - no gates, no windows and an apache inside.
==================================================


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to