Hi, > Depending on your setup and depending on how often you need to query the > count you could trade off a higher INSERT time for a lightning fast > count by using a trigger.
I have thought about that as well, yes. I have bulk-Inserts that prepropulate the table with a starting set of about 300k records and then peridioc updates that may UPDATE OR INSERT a few thousand of those every other hour. There are more frequent queries for the count than updates, so having a "cached" count is a good idea anyway. So I would split the process: Do a COUNT(*) to update the cached count after the Bulk-INSERT (where I would want to drop or deactivate the trigger) and use the trigger to track the updates. I have a similar two-fold approach regarding indexes. They get built after the bulk insert and are then active during the updates. Thank you for your suggestion. Ciao, MM -- Marian Aldenhövel, Rosenhain 23, 53123 Bonn www.marian-aldenhoevel.de "Du chillst nicht, Du hängst doch nur faul rum!" _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users