Hi,
On Nov 14, 2003, at 11:16 PM, Eric Soroos wrote:
Now that I have 2.0 built, I was poking around a bit and noticed that
there are no transactions used. This will tend to hurt performance (at
least for postgresql) for inserts and that sort of thing since the
database can batch writes to the database during a transaction.
Transactions are not used because MySQL ISAM tables do not support them.
With a really basic addition of begin/commit around the calls
db_insert_message and db_insert_block in pipe.c, I saw an improvement
of about 30% in insert speed over the non-transactioned version. (run
over ~1000 messages, 6 min vs ~9 min. )
That's quite a significant speedup.
It would probably be a good idea to put these functions
(db_begin_transaction(), commit_transaction(),
db_rollback_transaction()), in db.c, like you did. I did some test with
mysql, showing no difference when using these transaction statements.
It probably is safe to put the statements in there.
I'm only wondering where to put the calls to these functions. In db.c
(dbsearch.c & dbmsgbuf.c & authsql.c) itself, or in the functions
making use of the functions in those files (like you did, by putting
them in pipe.c)?
any ideas?
cheers,
Ilja