This is a discussion on How to schedule non-interrupt OPTIMIZE commands? within the MySQL forums, part of the Database Server Software category; --> Some questions: 1. How to schedule non-interrupt/min-interrupt OPTIMIZE commands? Any best practices? Assuming MySQL master-slave setup, with MyISAM 2. ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Some questions: 1. How to schedule non-interrupt/min-interrupt OPTIMIZE commands? Any best practices? Assuming MySQL master-slave setup, with MyISAM 2. Is it important to reorganizing the table for MyISAM, something like the REORG in other DMBS? Thanks. |
| |||
| howa wrote: > Some questions: > > 1. How to schedule non-interrupt/min-interrupt OPTIMIZE commands? Any > best practices? Assuming MySQL master-slave setup, with MyISAM > > 2. Is it important to reorganizing the table for MyISAM, something > like the REORG in other DMBS? > > Thanks. > there are different ways of scheduling the optimize command to run on either the master and/or slave. i'd like to run optimize locally (does not write to bin log) on my tables. depending upon what os your work out of, you can write a shell and/or bat file to accomplish this and then schedule it to run either with cron and/or windows scheduler. it is important to reorg myisam tables specially if the table is volatile (a lot of write and delete). -- lark -- hamzee@sbcdeglobalspam.net To reply to me directly, delete "despam". |
| |||
| On 5¤ë21¤é, ¤U¤È9®É19¤À, lark <ham...@sbcdeglobalspam..net> wrote: > there are different ways of scheduling the optimize command to run on > either the master and/or slave. i'd like to run optimize locally (does > not write to bin log) on my tables. depending upon what os your work out > of, you can write a shell and/or bat file to accomplish this and then > schedule it to run either with cron and/or windows scheduler. > optimize on the slave would be more easy as i can just point to another slave db. but do you think master also need to optimize? i mean if i don't optimize the master for long time, will write performance suffer? > it is important to reorg myisam tables specially if the table is > volatile (a lot of write and delete). > may i know how to do `reorg` in mysql? thanks....... |
| |||
| howa wrote: > On 5¤ë21¤é, ¤U¤È9®É19¤À, lark <ham...@sbcdeglobalspam.net> wrote: >> there are different ways of scheduling the optimize command to run on >> either the master and/or slave. i'd like to run optimize locally (does >> not write to bin log) on my tables. depending upon what os your work out >> of, you can write a shell and/or bat file to accomplish this and then >> schedule it to run either with cron and/or windows scheduler. >> > > optimize on the slave would be more easy as i can just point to > another slave db. > but do you think master also need to optimize? i mean if i don't > optimize the master for long time, will write performance suffer? > > >> it is important to reorg myisam tables specially if the table is >> volatile (a lot of write and delete). >> > > may i know how to do `reorg` in mysql? > > thanks....... > you run the optimize command on the table like this: optimize table t1; that'll do it. -- lark -- hamzee@sbcdeglobalspam.net To reply to me directly, delete "despam". |