Steve,

>> you should set autocommit=0 and only call commit after the
>> whole batch of inserts.
>> 
>
>so then if I'm inserting via a mysqldump file I should
>append commit; to the last line of the file?

yes, put on the first line of the dump file

      set autocommit = 0;

and on the last line

      commit;

I assume you import the file something like this:

      mysql < yourtabledumpfile

>I believe with BDB that if I inserted 700megs of data via one
>transaction that I would have a 700 meg log file that would have
>to be stuffed into the database on commit;  it is not the same with
>INNODB?  If I only have 3 50meg log files is this going to fail?

InnoDB does not use the log files for rollback. In rollback
it uses the undo log stored in the rollback segment in the tablespace.
The undo log is rather compact, in your case (only 50 000 rows) it might be
of the order 1.5 MB. Thus the size of the log files does
not restrict the size of transactions you run in InnoDB.

>> I will look into the log flush behavior of InnoDB. I now call
>> fsync (= file flush) twice after each log write, and the write is
>> done with a separate i/o thread. I have to try doing the write with the
>> same thread, and calling fsync only once. Ideally, we should be able
>> to make one commit for each rotation of the disk.
>> 
>> What is your operating system? Are you using an IDE disk?
>> 
>
>linux 2.2.12, yes, this machine has only one IDE disk on it.

I sent you a modified os0file.c where I have replaced fsync with
the O_SYNC option used in opening of a file. It might speed up
commits by a factor of 3. But see my other post on this mailing
list half an hour ago about strange phenomena I measured on two
computers in connection with fsync.

Regards,

Heikki
http://www.innobase.fi



---------------------------------------------------------------------
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