기존 wiki 테이블(인덱스 제외)에서 카테고리로 정렬한 테이블 생성
create table wiki2 select w.keyword, w.contents, w.img_url, w.detail_url, w.classification, w.category from wiki as w order by category;
alter table wiki2 add id bigint not null auto_increment primary key first;
create fulltext index keyword_fullidx on wiki2 (keyword) with parser ngram;
검색어: 비숑프리제, 카테고리: 사회인문
기존 테이블
SELECT sql_no_cache * FROM wiki WHERE MATCH(keyword) AGAINST('비숑프리제') and category="사회인문" limit 500;
duration: 0.141 , fetch: 2.390 sec
카테고리로 정렬된 테이블
select sql_no_cache * from wiki2 where match(keyword) against('비숑프리제') and category="사회인문" limit 500;
duration: 0.188 sec, fetch: 1.283 sec
검색어: 상대성 아인슈타인 이론, 카테고리: 사회인문
기존 테이블
duration: 0.141 sec, fetch: 1.250 sec
카테고리로 정렬된 테이블
duration: 0.123 sec, fetch: 0.766 sec