Re: [sqlite] How to get the total row number of a table by Sqlite more efficient?

2009-01-11 Thread Wenton Thomas
There is no guarantee that it always gets the correct result. For example, we insert 10 records and then delete 2 of them. If the 2 records does not hold the maximum id, the result is not correct. From: jesuscheung To:

Re: [sqlite] How to get the total row number of a table by Sqlite more efficient?

2009-01-08 Thread jesuscheung
if your table's primary key is auto incremented, try: select max(id) from table this will be faster than using count() -- View this message in context: http://www.nabble.com/How-to-get-the-total-row-number-of-a-table-by-Sqlite-more-efficient%EF%BC%9F-tp20061797p21359430.html Sent from the

Re: [sqlite] How to get the total row number of a table by Sqlite more efficient?

2008-10-20 Thread Igor Tandetnik
"yokk y" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want to get the total rows of a table, here are my methods: > > Is there some more efficient methods or API interface with > Sqlite?Because my program invoke this interface very frequency. If it's really that