"Zbigniew Baniewski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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)
It's unlikely to be any faster. count(*) does precisely the same thing internally, anyway. Depending on the nature of <condition>, you might be able use indexes to speed up the WHERE part. > although not always I want > to fetch all that data. Sometimes I would just to count it. Don't call sqlite3_column_*. Just call sqlite3_step in a loop. But again, if you want to get a count of records, you are unlikely to be able to do any better than a statement using count(). -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users