Mais conteúdo relacionado Semelhante a Groonga導入事例−地域コミュニティサイトLOHABUU (20) Groonga導入事例−地域コミュニティサイトLOHABUU14. パフォーマンス⽐比較
MySQL
mysql> select * from cgms
-> where body like '%sapporo%'
-> order by orig_updated_at desc limit 10;
・・・
10 rows in set (49.15 sec)
!
Rroonga
> def search_sapporo
> t_start = Time.now.instance_eval { self.to_i * 1000 + (usec/1000) }
> cgms = ::GroongaSearchEngine.search('sapporo')
> t_end = Time.now.instance_eval { self.to_i * 1000 + (usec/1000) }
> puts t_end - t_start
> end
> search_sapporo
1055 (≒1.06sec)
LOHABUU札幌のCGMテーブル
(176万件)の検索速度比較
18. テーブル構造
Entry
!
table_id : unsigned integer
title : text
body : text
type : text
orig_updated_at: time
・・・・
location :wgs84_geo_point
・・・
N-‐‑‒gram
インデックス
Geo
インデックス
Time
インデックス