On Mon, Jun 28, 2004 at 09:21:04PM +0100, Andrew Pattison wrote:
> By default MySQL flushes keys to disk with every INSERT, hence the
> performance degredation with performing several single INSERTs one after the
> other. The following extract from the MySQL documentation hints at one way
> of changing this on a per-table basis:
> 
> a.. Declaring a MyISAM table with the DELAY_KEY_WRITE=1 table option makes
> index updates faster because they are not flushed to disk until the table is
> closed. The downside is that if something kills the server while such a
> table is open, you should ensure that they are okay by running the server
> with the --myisam-recover option, or by running myisamchk before restarting
> the server. (However, even in this case, you should not lose anything by
> using DELAY_KEY_WRITE, because the key information can always be generated
> from the data rows.)
> 
> There is also a way of getting MySQL to do "lazy writing" of indexes on a
> global basis but I couldn't find a quick reference to that.

Delayed Key Writes:

  http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html

Search that page for "delay" and you'll find it.

Jeremy
-- 
Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

[book] High Performance MySQL -- http://highperformancemysql.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to