> I had just 1 year of java studies in school and working on dbs with > java is the first time. > Therefore I didn't know about the transaction.
1. Actually it isn't true for all databases that transaction will speed up as much as SQLite does. 2. Batch isn't a good idea. At least not in SQLite driver - it will simply store all queries in an ArrayList and execute just like you would without a batch. If you have a lot of queries it may throw OutOfMemory (but even if you won't use batch remember to call setAutoCommit(false) and commit() when done). 3. In your code you don't close created statements - conn.close() will close them eventually, but there is no reason to keep them open so long. 4. You should use single PreparedStatement instead of multiple Statements. It will speed up inserting even more (but not as much as a transacttion) - database won't have to parse the same query every time (that should be true with most databases). 5. Not speed related: e.printStackTrace() is usually horrible exception handling. --~--~---------~--~----~------------~-------~--~----~ Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en To unsubscribe, send email to [EMAIL PROTECTED] -~----------~----~----~----~------~----~------~--~---
