You could maintain a queue in memory of all the data to be written, have each page view queue up the new data and have a single db writer thread that dequeues items and writes to the db. That way you get the benefit of writing directly to the db, but do not have the extra overhead on each page view of writing to the db. There is a risk of data loss for whatever is queued up and not yet written to the db but as long as you're running the writer thread often enough it's not a great concern (especially since the data is not critical in that if you lose a few records it's no big loss).
By batching the writes you also can take advantage of transactions to speed up writes. HTH, Sam ------------------------------------------- We're Hiring! Seeking a passionate developer to join our team building Flex based products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] -----Original Message----- From: FredAt [mailto:[EMAIL PROTECTED] Sent: Friday, November 16, 2007 8:26 AM To: [email protected] Subject: [sqlite] Would SQLite be a good choice Hello All, I have used SQLite off and on in Windows applications I have written and I really like it. However, what I am now considering doing is using a SQLite database to log access to one of my websites - I need to get a great deal more information than I can get via normal log files. Doing this will involve making the following entries to SQLite tables each time someone views a document on my site 1. A 20 byte string providing me with information regarding the user's computer. 2. 48 bytes of data, in three columns, in another table to allow me to track user activity during a session. On the server side I will be manipulating my SQLite databases using PHP. My site currently has around a 1000 page views per day and the number is growing. Is SQLite a good choice for the job? I like it and I want to avoid getting messy with more heavyweight options but I need to be sure that it is going to work. I would much appreciate any advice. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

