On Sun, Oct 23, 2011 at 8:57 AM, Simon Slavin <slav...@bigfraud.org> wrote: > It seems that this was the first problem he found with the way he arranged > this database. But our solution to it would be different depending on > whether he wanted to do this just the once, or it was a regular requirement. > With this structure I might use TRIGGERs to keep track of the number of rows > in each table. But Bo might want more than count(*). But TRIGGERs could be > used to keep track of a total too.
I will do this multiple times, with different conditions (e.g. SELECT MAX(c) FROM TABLE_X WHRE b > 1.0) so maintaining number of rows would not help. I intentionally avoided TRIGGERs because of the large amount (billions) of data inserted. Other than using a SSD to speed up random access, I hope a VACUUM operation would copy tables one by one so content of the tables would not scatter around the whole database. If this is the case, disk caching should work much better after VACUUM... fingers crossed. Bo _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users