2011/10/16 Frank Missel <i...@missel.sg> > > But it sounds a bit like Fabian both wants to have the total number of > records available and at the same time limit the count. > > No, I only want to have a capped total available.
If I would go with Simons solution, I have to read the rows for the first 100 pages (or whatever the cap is) into a temporary table, just to show the first page. I don't need a cache for all those other pages, so that seems a lot of overhead. I only want to know if there are 100 or less pages (without copying data around). Maybe COUNT() is also creating a temporary table behind the scenes, then the performance of Simons solutions would be comparable with what I have now, and I would have the advantage that I can re-use that table to show subsequent pages without reading from disk. But I always assumed COUNT() was faster than copying between tables, maybe I should just benchmark it. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users