On Wed, Apr 10, 2013 at 5:56 PM, Igor Tandetnik <[email protected]> wrote:
> On 4/10/2013 11:47 AM, Bheemrao, Veeresh wrote: > >> I would like to know is there any way to get row count for all the tables >> in a database using single Execute command? >> > > select (select count(*) from table1), (select count(*) from table2), ...; > > There is no system table that stores row counts for other tables, if > that's what you are asking. The only way to know how many rows a table > contains is to count them. FWIW, I've often thought that in the specific case of vtables, SQLite should allow for a count(*) optimization, by offering the vtable impl to provide that info w/o opening a cursor an iterating that cursor. My in-memory vtables are back by STL-like containers which know their sizes a-priori. My $0.02. --DD _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

