Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb_fts/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/innodb_fts/r/index_table.result |
SET GLOBAL INNODB_OPTIMIZE_FULLTEXT_ONLY=1; CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), content TEXT ) ENGINE= InnoDB; CREATE FULLTEXT INDEX idx ON articles (title, content); Warnings: Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID INSERT INTO articles (title, content) VALUES ('MySQL Tutorial','DBMS stands for MySQL DataBase ...'), ('How To Use MySQL Well','After you went through a ...'), ('Optimizing MySQL','In this tutorial we will show ...'), ('1001 MySQL Tricks','How to use full-text search engine'), ('Go MySQL Tricks','How to use full text search engine'); SET GLOBAL innodb_ft_aux_table="test/articles"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 1001 6 6 1 6 0 after 4 4 1 4 22 database 3 3 1 3 37 dbms 3 3 1 3 15 engine 6 7 2 6 46 engine 6 7 2 7 44 full 6 7 2 6 29 full 6 7 2 7 27 mysql 3 7 5 3 0 mysql 3 7 5 3 31 mysql 3 7 5 4 11 mysql 3 7 5 5 11 mysql 3 7 5 6 5 mysql 3 7 5 7 3 optimizing 5 5 1 5 0 search 6 7 2 6 39 search 6 7 2 7 37 show 5 5 1 5 42 stands 3 3 1 3 20 text 6 7 2 6 34 text 6 7 2 7 32 through 4 4 1 4 37 tricks 6 7 2 6 11 tricks 6 7 2 7 9 tutorial 3 5 2 3 6 tutorial 3 5 2 5 25 use 4 7 3 4 7 use 4 7 3 6 25 use 4 7 3 7 23 well 4 4 1 4 17 went 4 4 1 4 32 you 4 4 1 4 28 OPTIMIZE TABLE articles; Table Op Msg_type Msg_text test.articles optimize status OK SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 1001 6 6 1 6 0 after 4 4 1 4 22 database 3 3 1 3 37 dbms 3 3 1 3 15 engine 6 7 2 6 46 engine 6 7 2 7 44 full 6 7 2 6 29 full 6 7 2 7 27 mysql 3 7 5 3 0 mysql 3 7 5 3 31 mysql 3 7 5 4 11 mysql 3 7 5 5 11 mysql 3 7 5 6 5 mysql 3 7 5 7 3 optimizing 5 5 1 5 0 search 6 7 2 6 39 search 6 7 2 7 37 show 5 5 1 5 42 stands 3 3 1 3 20 text 6 7 2 6 34 text 6 7 2 7 32 through 4 4 1 4 37 tricks 6 7 2 6 11 tricks 6 7 2 7 9 tutorial 3 5 2 3 6 tutorial 3 5 2 5 25 use 4 7 3 4 7 use 4 7 3 6 25 use 4 7 3 7 23 well 4 4 1 4 17 went 4 4 1 4 32 you 4 4 1 4 28 SET SESSION debug="+d,fts_instrument_result_cache_limit"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 1001 6 6 1 6 0 after 4 4 1 4 22 database 3 3 1 3 37 dbms 3 3 1 3 15 engine 6 7 2 6 46 engine 6 7 2 7 44 full 6 7 2 6 29 full 6 7 2 7 27 mysql 3 7 5 3 0 mysql 3 7 5 3 31 mysql 3 7 5 4 11 mysql 3 7 5 5 11 mysql 3 7 5 6 5 mysql 3 7 5 7 3 optimizing 5 5 1 5 0 search 6 7 2 6 39 search 6 7 2 7 37 show 5 5 1 5 42 stands 3 3 1 3 20 text 6 7 2 6 34 text 6 7 2 7 32 through 4 4 1 4 37 tricks 6 7 2 6 11 tricks 6 7 2 7 9 tutorial 3 5 2 3 6 tutorial 3 5 2 5 25 use 4 7 3 4 7 use 4 7 3 6 25 use 4 7 3 7 23 well 4 4 1 4 17 went 4 4 1 4 32 you 4 4 1 4 28 SET SESSION debug="-d,fts_instrument_result_cache_limit"; DROP TABLE articles; SET GLOBAL innodb_ft_result_cache_limit=default; CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), content TEXT ) ENGINE= InnoDB; CREATE FULLTEXT INDEX idx_t ON articles (title); Warnings: Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID CREATE FULLTEXT INDEX idx_c ON articles (content); INSERT INTO articles (title, content) VALUES ('MySQL Tutorial','DBMS stands for MySQL DataBase ...'), ('How To Use MySQL Well','After you went through a ...'), ('Optimizing MySQL','In this tutorial we will show ...'), ('1001 MySQL Tricks','How to use full-text search engine'), ('Go MySQL Tricks','How to use full text search engine'); SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 1001 6 6 1 6 0 mysql 3 7 5 3 0 mysql 3 7 5 4 11 mysql 3 7 5 5 11 mysql 3 7 5 6 5 mysql 3 7 5 7 3 optimizing 5 5 1 5 0 tricks 6 7 2 6 11 tricks 6 7 2 7 9 tutorial 3 3 1 3 6 use 4 4 1 4 7 well 4 4 1 4 17 after 4 4 1 4 0 database 3 3 1 3 22 dbms 3 3 1 3 0 engine 6 7 2 6 28 engine 6 7 2 7 28 full 6 7 2 6 11 full 6 7 2 7 11 mysql 3 3 1 3 16 search 6 7 2 6 21 search 6 7 2 7 21 show 5 5 1 5 25 stands 3 3 1 3 5 text 6 7 2 6 16 text 6 7 2 7 16 through 4 4 1 4 15 tutorial 5 5 1 5 8 use 6 7 2 6 7 use 6 7 2 7 7 went 4 4 1 4 10 you 4 4 1 4 6 SET GLOBAL innodb_ft_aux_table="test/articles"; OPTIMIZE TABLE articles; Table Op Msg_type Msg_text test.articles optimize status OK SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 1001 6 6 1 6 0 mysql 3 7 5 3 0 mysql 3 7 5 4 11 mysql 3 7 5 5 11 mysql 3 7 5 6 5 mysql 3 7 5 7 3 optimizing 5 5 1 5 0 tricks 6 7 2 6 11 tricks 6 7 2 7 9 tutorial 3 3 1 3 6 use 4 4 1 4 7 well 4 4 1 4 17 after 4 4 1 4 0 database 3 3 1 3 22 dbms 3 3 1 3 0 engine 6 7 2 6 28 engine 6 7 2 7 28 full 6 7 2 6 11 full 6 7 2 7 11 mysql 3 3 1 3 16 search 6 7 2 6 21 search 6 7 2 7 21 show 5 5 1 5 25 stands 3 3 1 3 5 text 6 7 2 6 16 text 6 7 2 7 16 through 4 4 1 4 15 tutorial 5 5 1 5 8 use 6 7 2 6 7 use 6 7 2 7 7 went 4 4 1 4 10 you 4 4 1 4 6 DROP TABLE articles; SET NAMES utf8; CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE FULLTEXT INDEX idx ON articles (title); Warnings: Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID INSERT INTO articles (title) VALUES ('相亲相爱'),('怜香惜爱'),('充满可爱'),('爱恨交织'); SET GLOBAL innodb_ft_aux_table="test/articles"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 充满可爱 5 5 1 5 0 怜香惜爱 4 4 1 4 0 爱恨交织 6 6 1 6 0 相亲相爱 3 3 1 3 0 OPTIMIZE TABLE articles; Table Op Msg_type Msg_text test.articles optimize status OK SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 充满可爱 5 5 1 5 0 怜香惜爱 4 4 1 4 0 爱恨交织 6 6 1 6 0 相亲相爱 3 3 1 3 0 DROP TABLE articles; CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200) ) ENGINE=InnoDB DEFAULT CHARACTER SET gb2312 COLLATE gb2312_chinese_ci; CREATE FULLTEXT INDEX idx ON articles (title); Warnings: Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID INSERT INTO articles (title) VALUES ('相亲相爱'),('怜香惜爱'),('充满可爱'),('爱恨交织'); SET GLOBAL innodb_ft_aux_table="test/articles"; SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 爱恨交织 6 6 1 6 0 充满可爱 5 5 1 5 0 怜香惜爱 4 4 1 4 0 相亲相爱 3 3 1 3 0 OPTIMIZE TABLE articles; Table Op Msg_type Msg_text test.articles optimize status OK SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE; WORD FIRST_DOC_ID LAST_DOC_ID DOC_COUNT DOC_ID POSITION 怜香惜爱 4 4 1 4 0 充满可爱 5 5 1 5 0 相亲相爱 3 3 1 3 0 爱恨交织 6 6 1 6 0 DROP TABLE articles; SET GLOBAL innodb_ft_aux_table=default; SET GLOBAL INNODB_OPTIMIZE_FULLTEXT_ONLY=default;