Re: [sqlite] COUNT() on indexed tables /primary keywith 100'000records
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I supposed a very fast query even with many records, because COUNT( ) > might do its work on the index only. Well, it does, but the work is still proportional to the number of records counted. The index helps to quickly filter out records that _don't_ match the condition, but you still have to look at every record that does. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] COUNT() on indexed tables / primary keywith 100'000records
Hello Thank you for you quick responses. If I disable the index with + it takes around 50% more execution time. I supposed a very fast query even with many records, because COUNT( ) might do its work on the index only. I this case, I have to find another solution to get the number of records quickly. The often discussed "trigger COUNT() solution" might not be applicable here. Daniel Ursprüngliche Nachricht Von: [EMAIL PROTECTED] Datum: 14.07.2008 00:51 An: Betreff: Re: [sqlite] COUNT() on indexed tables / primary keywith 100'000records <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Lets say i have 120'000 records and worst case is that upto 90'000 > records match the conditions. Well, if you count almost all records, why do you expect the query to run substantially faster than the one that in fact counts all records? Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] COUNT() on indexed tables / primary keywith 100'000records
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Lets say i have 120'000 records and worst case is that upto 90'000 > records match the conditions. Well, if you count almost all records, why do you expect the query to run substantially faster than the one that in fact counts all records? Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users