Go Back   Forum Care Forums > Development Reference Area > MySQL Discussion

Reply
 
LinkBack Thread Tools Display Modes
How to schedule non-interrupt OPTIMIZE commands?
Old
  (#1)
howa
Guest
 
Posts: n/a
Default How to schedule non-interrupt OPTIMIZE commands? - 06-04-2007, 07:58 AM

Some questions:

1. How to schedule non-interrupt/min-interrupt OPTIMIZE commands? Any
best practices? ***uming MySQL master-slave setup, with MyISAM

2. Is it important to reorganizing the table for MyISAM, something
like the REORG in other DMBS?

Thanks.

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: How to schedule non-interrupt OPTIMIZE commands?
Old
  (#2)
lark
Guest
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands? - 06-04-2007, 07:58 AM

howa wrote:
> Some questions:
>
> 1. How to schedule non-interrupt/min-interrupt OPTIMIZE commands? Any
> best practices? ***uming 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 -- EMAIL REMOVED
To reply to me directly, delete "despam".
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: How to schedule non-interrupt OPTIMIZE commands?
Old
  (#3)
howa
Guest
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands? - 06-04-2007, 07:58 AM

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

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: How to schedule non-interrupt OPTIMIZE commands?
Old
  (#4)
lark
Guest
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands? - 06-04-2007, 07:58 AM

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 -- EMAIL REMOVED
To reply to me directly, delete "despam".
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: How to schedule non-interrupt OPTIMIZE commands?
Old
  (#5)
howa
Guest
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands? - 06-04-2007, 07:58 AM


>
> you run the optimize command on the table like this:
>
> optimize table t1;
>
> that'll do it.


yes but seems reorg in other db do more then just optimize...thanks
anyway











   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top