Mysql全文索引技术测试语句序列

来源:互联网 发布:苹果mac截屏方法 编辑:程序博客网 时间:2024/06/06 01:25

CREATE TABLE `test`.`IndexTest` (
  `pr` INTEGER UNSIGNED NOT NULL,
  `t1` VARCHAR(45) NOT NULL,
  `t2` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`pr`)
)
ENGINE = MyISAM;


insert into IndexTest(pr, t1, t2) values(1, 'jack yy barclay', 'time date value interesting');
insert into IndexTest(pr, t1, t2) values(2, 'mary yy user', 'here there date');
insert into IndexTest(pr, t1, t2) values(3, 'john jack mary', 'value newyork');


select * from IndexTest where match(t2) against('date' IN BOOLEAN MODE) limit 100;
select * from IndexTest where match(t1,t2) against('jack' IN BOOLEAN MODE) limit 100;
select * from IndexTest where match(t1,t2) against('yy' IN BOOLEAN MODE) limit 100;

原创粉丝点击