Hi Peter and Christian!

>>If you are going to be committing on every record, you'll want your
>>tablespace and logfile directories on separate disks to avoid
>>thrashing.  If you only have one disk and don't care if you lose the
>>last few transactions if your system crashes, try setting
>>innobase_flush_log_at_trx_commit=0 in my.cnf.

CJ> Wow, thanks. With innobase_flush_log_at_trx_commit=0, the benchmark now
shows:

CJ> autocommit=0, rollback after each insert:   1587 inserts+rollbacks/sec
CJ> autocommit=1:                               2764 inserts/sec.

CJ> That's even faster than myisam (2487 inserts/sec today)!!!

>In this case you should compare it to myisam created with
>delay_key_write=1, also  the size of key_buffer matter.

>Also the problem with innobase_flush_log_at_trx_commit=0 should be
>there is no guarantie the last transaction commited will be on it's
>place if the power would be lost.  Also I don't know is it possible in
>this case for database to be corrupted as some transactions may modify
>database but are not in a logfile (Let's ask Heikki about this).

The database does not get corrupted even if you use
innobase_flush_logs_at_trx_commit=0 and it crashes: Innobase always writes
the appropriate log segment to disk before writing a modified database
page to disk. In this sense the log on disk is always 'ahead' of the disk
image of the database. But, of course, you may lose the updates of the
latest transactions in a crash, if the database has not yet written the
relevant log segment to disk.

Regards,

Heikki

>-- 
>Best regards,
> Peter                            mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to