Current Path : /home/usr.opt/mysql57/mysql-test/suite/ndb/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/ndb/r/ndb_optimize_table.result |
DROP TABLE IF EXISTS t1; set @val = "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"; set @val2 = 0x0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF; CREATE TABLE t1 ( pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, attr1 VARCHAR(1024), attr2 VARBINARY(1024), attr3 TEXT ) ROW_FORMAT=DYNAMIC ENGINE=ndbcluster; CREATE UNIQUE INDEX ui on t1(pk,attr1,attr2); set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz; set ndb_autoincrement_prefetch_sz = 256; set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz; select count(*) from t1; count(*) 10000 flush tables; select data_length from information_schema.tables where table_name like 't1' into @data_length0; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; delete from t1 where mod(pk, 100) < 75 order by pk limit 1000; select count(*) from t1; count(*) 2500 select count(*) from t1 where mod(pk, 100) < 75; count(*) 0 flush tables; select data_length from information_schema.tables where table_name like 't1' into @data_length; set ndb_optimization_delay = 0; optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK flush tables; select data_length from information_schema.tables where table_name like 't1' into @data_length2; select 100*(@data_length-@data_length2)/@data_length into @opt_level; select @opt_level > 30; @opt_level > 30 1 drop table t1;