mysql - WHEN use attribute DELAY_KEY_WRITE? -


when use attribute delay_key_write?
how helped ?

creta table(....) ;delay_key_write =1 

another performance option in mysql delay_key_write option. according mysql documentation option makes index updates faster because not flushed disk until table closed.

note option applies myisam tables,

you can enable on table table basis using following sql statement:

alter table sometable delay_key_write = 1; 

this can set in advanced table options in mysql query browser.

this performance option handy if have lot of update, because can delay writing indexes until tables closed. frequent updates large tables, may want check out option. ok, when mysql close tables?

that should have been next question. looks though tables opened when needed, added table cache. cache can flushed manually flush tables; here's how closed automatically according docs:

1.when cache full , thread tries open table not in cache.

2.when cache contains more table_cache entries , thread no longer using table.

3.flush tables; called.

"if delay_key_write enabled, means key buffer tables option not flushed on every index update, when table closed. speeds writes on keys lot, if use feature, should add automatic checking of myisam tables starting server --myisam-recover option (for example, --myisam-recover=backup,force)."

so if use option may want flush table cache periodically, , make sure startup using myisam-recover option.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -