On 6/18/08, Stefan Arentz <[EMAIL PROTECTED]> wrote: > On Wed, Jun 18, 2008 at 11:51 AM, Scott Baker <[EMAIL PROTECTED]> wrote: > > Stefan Arentz wrote: > >> Is it possible to get the size of a table without running a count(*) > >> query on it? Even an approximated size would be good for me. > >> PostgreSQL has this value in a system table. Does SQLite have > >> something similar? > > > > What wrong with running SELECT count(*) it should be very fast. > > > It seems to run a full table scan. I have 10+ million rows. > >
Search the archives. This question comes up a lot. Briefly... create a TRIGGER to keep track of the count of rows in a separate table as you go on INSERTing or DELETEing. Then just query this count_of_rows table. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users