MySQL Forums
Forum List  »  Performance

Re: Stored Procedure too slow
Posted by: Rick James
Date: December 05, 2012 12:18AM

Your information confirms my guess...

> innodb_flush_log_at_trx_commit,1 -- says to flush the transaction to disk immediately after committing.
> autocommit ON -- says to treat each SQL statement as a separate transaction and commit immediately
> insert? 1 row at time -- says that you are inserting only one row per transaction.
> (unstated -- disk speed) -- an ordinary disk can handle only 100 operations per second.

Some speedups:

innodb_flush_log_at_trx_commit,1 -- change to 2 for more speed, at a slight cost of safety.

Whenever practical, "batch" your inserts -- that is, insert multiple rows in one statement.

When it makes sense to your application, do BEGIN ... COMMIT. (It will temporarily override autocommit.)

Options: ReplyQuote


Subject
Views
Written By
Posted
2942
December 03, 2012 04:46AM
1584
December 03, 2012 09:00AM
1169
December 03, 2012 09:27AM
1127
December 04, 2012 12:20AM
1710
December 04, 2012 07:02AM
Re: Stored Procedure too slow
1306
December 05, 2012 12:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.