Вопрос

Playing around with TokuDB I'm finding even after "optimize table" for things such as changing row compression or other DDLs it takes a non deterministic amount of time for freed space to be reflected in the file system.

Is there anyway to force this more immediately or otherwise view status of if the clean up is in progress or otherwise scheduled?

Это было полезно?

Решение

Have you simply tried "mysql> show processlist;"? TokuDB displays the progress of optimize operations in plain view.

Другие советы

Suppose you have a TokuDB table mytable in the mydb database.

You should do a NULL storage engine conversion. In other words, simply convert it to TokuDB again.

ALTER TABLE mydb.mytable ENGINE=TokuDB;
ANALYZE TABLE mydb.mytable;

You can watch the creation of the temp table in /var/lib/mysql/db. Look for any table named *sql-*

If you want to monitor the stages, then convert the table in stages

USE mydb
CREATE TABLE mytable_new LIKE mytable;
INSERT INTO mytable_new SELECT * FROM mytable;
ANALYZE TABLE mydb.mytable_new;
ALTER TABLE mytable RENAME mytable_old;
ALTER TABLE mytable_new RENAME mytable;
DROP TABLE mytable_old;

To monitor it, goto /var/lib/mysql/db and run ls -l mytable*

Give it a Try !!!

UPDATE 2014-07-03 13:53 EDT

MariaDB has progress metering for DDL. I wrote about this in my old post Is there a progress indicator for OPTIMIZE TABLE progress?. You may need to switch to MariaDB and enable TokuDB.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с dba.stackexchange
scroll top