Hi,
I use all this in the same order and i don't have any problems:
    CHECK TABLE
    IF (CHECK TABLE!=OK)
    {
        REPAIR TABLE
    }
     //  i don't use analyze tables
    OPTIMIZE TABLE
Before to perform this commands, you must be sure is not any users connected
(show full processlist;) to the DataBase.

Good luck,
Gelu

----- Original Message -----
From: Peter Romianowski <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 09, 2002 2:08 PM
Subject: check, analyze and optimize table


> Hi,
>
> I am writing a maintenance-deamon which is executing
> CHECK TABLE, ANALYZE TABLE and OPTIMIZE TABLE once at
> night.
> If CHECK TABLE fails for at least one table, then the
> rest will be skipped.
> The question is if the order of the statements is ok
> this way. A second question would be, if I should run
> a REPAIR statement automatically if CHECK fails.
> Are there any more tasks that I should perform nightly
> in order to keep my database healthy and in a "high
> performance shape"?
> And another general question: Do I have to take down
> my Application that is using the MySQL-DB in order to
> perform the CHECK, ANALYZE and OPTIMZE commands?
>
> thanks in advance,
> Peter
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to