David M. Cotter <m...@davecotter.com> wrote: > i may not have been clear > > i want to begin transactions on different threads at once
Why, if you don't mind me asking? Your hard drive has only one write head. What makes you feel that writing to the same file from multiple threads would be any faster than doing it from one thread? In any case, you can't do with SQLite what you think you want to do. Personally, I'd have one thread dedicated to SQLite work, then all the other threads would generate the data to be inserted, and feed it to the SQLite worker via a producer-consumer queue. > but does inserting data during a transaction actually block too? Yes. > is inserting considered a "writing transaction" if there is a "begin" before > it? Yes. > cuz it's not actually writing to the DB proper, > it's writing to it's journal file Incorrect. SQLite writes previous, unmodified data into journal file, prior to overwriting parts of actual database file with new data. Committing a transaction consists simply of deleting the journal file. Rolling back means copying the data over from the journal file back to the database file. > i'm not using "begin immediate", just using "begin" This just means the transaction becomes a write transaction a split second later, when the first INSERT statement is executed. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users