OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Heikki Korpela (hekosaitti.net)
Date: Mon Apr 02 2001 - 09:56:53 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On Mon, 2 Apr 2001, lgbwebmaster wrote:

    > mysql> create index MyIndex on MyTable ( MyField );
    > 'top' shows that mysqld is at 99% cpu, and the index is still not done
    > being built after 30 minutes.

    > Also, I tested MySQL 3.23.36 with the same setup as above and got identical
    > results.

    > I have the same data in MySQL on a Linux box, and everything works fine.
    > The index shown above takes about 3 minutes to build. The mysqldump takes
    > 5-10 minutes.

    Well, index operations *may* take quite a while. I've lingered
    over an empty prompt on a moderately capable server for quite some time
    on index builds of poorly built MySQL tables on top of various Linux
    boxes. You might just want to check enable some more verbosity first
    and then try optimizing your tables as per the MySQL documentation.

    I use alias mysql='mysql -v -v -v -T -U ' and

    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    log-update=/var/log/mysql/update.log
    log=/var/log/mysql/mysql.log
    log-long-format
    log-slow-queries=/var/log/mysql/slow.log

    in /etc/my.cnf. Make sure /var/log/mysql is owned my mysql user.

    You could also pass some format of myisamchk to the tables.

    If this does not provide any useful information, you could get brave
    and try ktrace(1), something like

       ktrace -d -i <command>

    or

       ktrace -d -i -p <PID>

    > Many thanks -
    > Jim

    <!-- ---------------------- 72 characters -------------------------- -->
                       Heikki Korpela -- hekosaitti.net