How to find out which table is consuming resources under MySQL Database server from UNIX shell prompt?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ryan
    Member
    • Jun 2008
    • 96

    How to find out which table is consuming resources under MySQL Database server from UNIX shell prompt?

    How do find out which table is consuming resources under MySQL Database server from UNIX shell prompt?

    One can use mytop command a console-based (non-gui) tool for monitoring the threads and overall performance of a MySQL.

    Install mytop

    First install required perl modules:

    cpan -i Term::ReadKey
    cpan -i Term::ANSIColor
    cpan -i Time::HiRes

    Next, install mytop, enter:

    wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz
    tar -zxvf mytop-1.6.tar.gz
    cd mytop-1.6
    perl Makefile.PL
    make
    make test
    make install

    To view information about database called foo, enter:

    $ mytop -u dba -p 'password' -h 10.2.4.5 -d foo

    Where,

    -u : Database username.
    -p : Database password.
    -h : Database server IP address.
    -d : Database name.

    Read mytop man page for further information:

    perldoc mytop
    Last edited by admin; 08-18-2015, 05:46 AM.
  • kilter
    Member
    • Oct 2009
    • 79

    #2
    Re: How to find out which table is consuming resources under MySQL Database server from UNIX shell prompt?

    Thanks for posting your comments.. Very good way to install mytop Let's look at a few scenarios where a conversion to MySQL may not be ideal for you however there is one small step missing my suggestion is that when you describe such tips like installing a package etc, i guess you should tell how to do this in other os also for eg, in freebsd mytop can be installed in from /usr/ports/databases/mytop While converting an Access or SQL Server database to MySQL offers many benefits, it may not be the ideal solution for your application. After tar one needs to go into mytop directory to run perl Makefile.PL.

    Thank you.
    Last edited by admin; 08-18-2015, 05:46 AM.

    Comment

    Working...
    X