I'm trying to use mytop for figuring out what queries are being executed and how long they take. I can connect properly to the db but

MySQL on localhost (5.1.41-3ubuntu12.8)                 up 0+01:50:47 [09:30:43]
Queries: 3.0     qps:    0 Slow:     0.0         Se/In/Up/De(%):    68767/00/00/00

Key Efficiency: 99.1%  Bps in/out:   0.0/  1.2

        Id      User         Host/IP         DB      Time    Cmd Query or State
        --      ----         -------         --      ----    --- --------------
       225      root       localhost                    0  Query show full processlist
       186      joom       localhost   culinary      5684  Sleep

The number of queries increases over time but the queries themselves do not appear in the list. Is there some type of configuration that I need to do to enable it?


mytop can only show the queries that are executing at the moment that it samples--much like top can only show information about processes at the time it checks. You can adjust the sampling rate with the 's' key or hit the space bar to force an update.

(I wrote mytop.)


Possible queries are executed too quickly(default delay 5 second,to change press 's')

Run in MySQL:

mysql> SELECT SLEEP(100);

Then see mytop output.

  • Thanks. It seems I misunderstood the use of mytop. I guess the question should be, is there a tool that can let me monitor queries in realtime? – recluze Feb 10 '11 at 7:32
  • mytop monitor queries in realtime wiht delay... SHOW PROCESSLIST monitor queries in realtime...General Query Log monitor all queries in file. – alvosu Feb 10 '11 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.