On Sun, Sep 21, 2008 at 05:22:46PM -0500, Jay A. Kreibich wrote: > count(*) is an odd one... In most database systems it is extremely > fast, but in SQLite it tends to be rather slow. > [..] > If you search the archives, you'll find many discussions on the best > way to create a system table that keeps track of the number of rows > in each table via triggers.
The problem is, that it's not only about global number of records - I would to have a possibility to quickly count number of records found by conditional queries like: "select count(*) from table where <condition>". Partially it can be solved by moving the task to the application (fetch, then count list size), although not always I want to fetch all that data. Sometimes I would just to count it. It wasn't a problem, when I was counting several thousands of records - but, as I can see, it will be inconvenient in the case of the larger table. -- pozdrawiam / regards Zbigniew Baniewski _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users