June 11, 2009

The feature I love in TokuDB

Posted by Vadim |

Playing with TokuDB updates I noticed in SHOW PROCESSLIST unsual for MySQL State.

CODE:
  1. mysql> show processlist;
  2. +----+------+-----------+--------+---------+------+---------------------------+-----------------------------+
  3. | Id | User | Host      | db     | Command | Time | State                     | Info                        |
  4. +----+------+-----------+--------+---------+------+---------------------------+-----------------------------+
  5. 3 | root | localhost | sbtest | Query   |   30 | Updated about 764000 rows | update sbtest set email=zip |
  6. ...
  7. mysql> show processlist;
  8. +----+------+-----------+--------+---------+------+----------------------------+-----------------------------+
  9. | Id | User | Host      | db     | Command | Time | State                      | Info                        |
  10. +----+------+-----------+--------+---------+------+----------------------------+-----------------------------+
  11. 3 | root | localhost | sbtest | Query   |   79 | Updated about 1900000 rows | update sbtest set email=zip |
  12. ...

(Do not look in stupid UPDATE query, it's just for testing :) )

So looking in SHOW PROCESSLIST you can see progress of query execution.

I would want to see it in standard MySQL and InnoDB more than all these triggers and stored routines! Probably will implement this in XtraDB.

Related posts: :Interviews for InfiniDB and TokuDB are next::Air traffic queries in MyISAM and Tokutek (TokuDB)::Detailed review of Tokutek storage engine:
 

4 Comments »

  1. 1. Adomas

    I’ve always missed this kind of stuff from MySQL. Hope to see more of it coming to MySQL and other forks.

    Comment :: June 12, 2009 @ 2:15 am

  2. That is so awesome. Does it work for ALTER TABLE too?

    Can’t help but wonder how many times I’ve impatiently killed a MySQL server, assuming a long-running query was never going to finish, never to discover that it was only 30 seconds away from completing.

    Comment :: June 12, 2009 @ 6:40 am

  3. Gil, TokuDB shows progress for alter tables that add or drop indexes. It does not show progress for other alter tables (such as those that add a column).

    In summary, TokuDB shows progress in the following situations:
    1) updates, as shown above
    2) deletes, similar to above
    3) insert statements (for example, doing loads with “insert into foo select * from bar” will show progress)
    4) index creation

    Comment :: June 12, 2009 @ 7:25 am

  4. 4. Mchl

    Nah… i would not exchange triggers for this… Still would be a nice thing to have.

    Comment :: June 13, 2009 @ 7:33 am

 

Subscribe without commenting

Trackbacks/Pingbacks