Unix Technical Forum

How to schedule non-interrupt OPTIMIZE commands?

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


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 10:52 AM
howa
 
Posts: n/a
Default How to schedule non-interrupt OPTIMIZE commands?

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 10:52 AM
lark
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands?

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".
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 10:52 AM
howa
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands?

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
  #4 (permalink)  
Old 02-28-2008, 10:52 AM
lark
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands?

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".
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 10:52 AM
howa
 
Posts: n/a
Default Re: How to schedule non-interrupt OPTIMIZE commands?


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:43 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com