--source include/have_innodb.inc --let $pid_file = `SELECT @@global.pid_file` --echo pid_file: $pid_file SET @saved_thread_cache_size = @@global.thread_cache_size; SET GLOBAL thread_cache_size = 0; CREATE TABLE t1 ( col1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, col2 TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, col3 TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, col4 TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, col5 LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, col6 TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, col7 TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, col8 TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, col9 VARCHAR(255) DEFAULT NULL, col10 TEXT, col11 TEXT, col12 ENUM('low', 'normal', 'high') NOT NULL, col13 TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, PRIMARY KEY (col1), UNIQUE KEY col9_UNIQUE (col9), FULLTEXT KEY col10_idx (col10), FULLTEXT KEY col11_idx (col11), FULLTEXT KEY col4_idx (col4), FULLTEXT KEY col5_idx (col5), FULLTEXT KEY col_composite (col2, col3, col8, col6, col7, col5, col4, col13), FULLTEXT KEY col23_composite (col2, col3), FULLTEXT KEY col867_composite (col8, col6, col7), FULLTEXT KEY col2_idx (col2), FULLTEXT KEY col3_idx (col3), FULLTEXT KEY col8_idx (col8) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --disable_query_log --let $i = 1 --let $n = 4591 while($i <= $n) { eval INSERT INTO t1 SET col2 = 'test@test.test$i', col3 = 'Percona $i', col4 = 'Lorem Ipsum', col5 = REPEAT('Lorem Ipsum $i ', 1000), col6 = 'Lorem Ipsum $i', col7 = 'Ipsum Lorem $i', col8 = 'test@test.test$i', col9 = 'asdkjsadkjsad;jadkjadlk $i', col10 = REPEAT('Lorem Ipsum $i ', 1000), col11 = 'lorem ipsum', col12 = 'normal', col13 = 'something' ; --echo inserting: $i --inc $i } --enable_query_log --let $i = 0 --let $n = 100 while($i < $n) { --connect(con1,localhost,root,,test) --connection con1 --disable_result_log SELECT COUNT(*) FROM t1 WHERE MATCH (col2, col3, col8, col6, col7, col5, col4, col13) AGAINST ('"ipsum"'); --enable_result_log --exec pidstat -p `cat $pid_file` -r --echo querying: $i --disconnect con1 --inc $i } --connection default DROP TABLE t1; SET GLOBAL thread_cache_size = @saved_thread_cache_size;