Submit Search
Upload
PostgreSQLで日本語全文検索 - LIKEとpg_bigmとPGroonga
•
1 like
•
1,081 views
Kouhei Sutou
Follow
PostgreSQLアンカンファレンス@東京(2015/5/30)でPostgreSQLの日本語全文検索まわりについて紹介した資料です。
Read less
Read more
Report
Share
Report
Share
1 of 26
Download now
Download to read offline
Recommended
Postgres Toolkitのご紹介
Postgres Toolkitのご紹介
Uptime Technologies LLC (JP)
PostreSQL監査
PostreSQL監査
NTT DATA OSS Professional Services
[B23] PostgreSQLのインデックス・チューニング by Tomonari Katsumata
[B23] PostgreSQLのインデックス・チューニング by Tomonari Katsumata
Insight Technology, Inc.
Web エンジニアが postgre sql を選ぶ 3 つの理由
Web エンジニアが postgre sql を選ぶ 3 つの理由
Soudai Sone
ブロックチェーンの仕組みと動向(入門編)
ブロックチェーンの仕組みと動向(入門編)
NTT DATA OSS Professional Services
20170303 java9 hadoop
20170303 java9 hadoop
NTT DATA OSS Professional Services
RubyKaigi 2022 - Fast data processing with Ruby and Apache Arrow
RubyKaigi 2022 - Fast data processing with Ruby and Apache Arrow
Kouhei Sutou
Apache Arrow Flight – ビッグデータ用高速データ転送フレームワーク #dbts2021
Apache Arrow Flight – ビッグデータ用高速データ転送フレームワーク #dbts2021
Kouhei Sutou
Recommended
Postgres Toolkitのご紹介
Postgres Toolkitのご紹介
Uptime Technologies LLC (JP)
PostreSQL監査
PostreSQL監査
NTT DATA OSS Professional Services
[B23] PostgreSQLのインデックス・チューニング by Tomonari Katsumata
[B23] PostgreSQLのインデックス・チューニング by Tomonari Katsumata
Insight Technology, Inc.
Web エンジニアが postgre sql を選ぶ 3 つの理由
Web エンジニアが postgre sql を選ぶ 3 つの理由
Soudai Sone
ブロックチェーンの仕組みと動向(入門編)
ブロックチェーンの仕組みと動向(入門編)
NTT DATA OSS Professional Services
20170303 java9 hadoop
20170303 java9 hadoop
NTT DATA OSS Professional Services
RubyKaigi 2022 - Fast data processing with Ruby and Apache Arrow
RubyKaigi 2022 - Fast data processing with Ruby and Apache Arrow
Kouhei Sutou
Apache Arrow Flight – ビッグデータ用高速データ転送フレームワーク #dbts2021
Apache Arrow Flight – ビッグデータ用高速データ転送フレームワーク #dbts2021
Kouhei Sutou
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache Arrow
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache Arrow
Kouhei Sutou
Rubyと仕事と自由なソフトウェア
Rubyと仕事と自由なソフトウェア
Kouhei Sutou
Apache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのか
Kouhei Sutou
Apache Arrow 1.0 - A cross-language development platform for in-memory data
Apache Arrow 1.0 - A cross-language development platform for in-memory data
Kouhei Sutou
Apache Arrow 2019
Apache Arrow 2019
Kouhei Sutou
Redmine検索の未来像
Redmine検索の未来像
Kouhei Sutou
Apache Arrow - A cross-language development platform for in-memory data
Apache Arrow - A cross-language development platform for in-memory data
Kouhei Sutou
Better CSV processing with Ruby 2.6
Better CSV processing with Ruby 2.6
Kouhei Sutou
Apache Arrow
Apache Arrow
Kouhei Sutou
Apache Arrow - データ処理ツールの次世代プラットフォーム
Apache Arrow - データ処理ツールの次世代プラットフォーム
Kouhei Sutou
Apache Arrow
Apache Arrow
Kouhei Sutou
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
Kouhei Sutou
MySQL 8.0でMroonga
MySQL 8.0でMroonga
Kouhei Sutou
My way with Ruby
My way with Ruby
Kouhei Sutou
Red Data Tools
Red Data Tools
Kouhei Sutou
Mroongaの高速全文検索機能でWordPress内のコンテンツを有効活用!
Mroongaの高速全文検索機能でWordPress内のコンテンツを有効活用!
Kouhei Sutou
MariaDBとMroongaで作る全言語対応超高速全文検索システム
MariaDBとMroongaで作る全言語対応超高速全文検索システム
Kouhei Sutou
PGroonga 2 – Make PostgreSQL rich full text search system backend!
PGroonga 2 – Make PostgreSQL rich full text search system backend!
Kouhei Sutou
PGroonga 2 - PostgreSQLでの全文検索の決定版
PGroonga 2 - PostgreSQLでの全文検索の決定版
Kouhei Sutou
PostgreSQLとPGroongaで作るPHPマニュアル高速全文検索システム
PostgreSQLとPGroongaで作るPHPマニュアル高速全文検索システム
Kouhei Sutou
More Related Content
More from Kouhei Sutou
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache Arrow
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache Arrow
Kouhei Sutou
Rubyと仕事と自由なソフトウェア
Rubyと仕事と自由なソフトウェア
Kouhei Sutou
Apache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのか
Kouhei Sutou
Apache Arrow 1.0 - A cross-language development platform for in-memory data
Apache Arrow 1.0 - A cross-language development platform for in-memory data
Kouhei Sutou
Apache Arrow 2019
Apache Arrow 2019
Kouhei Sutou
Redmine検索の未来像
Redmine検索の未来像
Kouhei Sutou
Apache Arrow - A cross-language development platform for in-memory data
Apache Arrow - A cross-language development platform for in-memory data
Kouhei Sutou
Better CSV processing with Ruby 2.6
Better CSV processing with Ruby 2.6
Kouhei Sutou
Apache Arrow
Apache Arrow
Kouhei Sutou
Apache Arrow - データ処理ツールの次世代プラットフォーム
Apache Arrow - データ処理ツールの次世代プラットフォーム
Kouhei Sutou
Apache Arrow
Apache Arrow
Kouhei Sutou
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
Kouhei Sutou
MySQL 8.0でMroonga
MySQL 8.0でMroonga
Kouhei Sutou
My way with Ruby
My way with Ruby
Kouhei Sutou
Red Data Tools
Red Data Tools
Kouhei Sutou
Mroongaの高速全文検索機能でWordPress内のコンテンツを有効活用!
Mroongaの高速全文検索機能でWordPress内のコンテンツを有効活用!
Kouhei Sutou
MariaDBとMroongaで作る全言語対応超高速全文検索システム
MariaDBとMroongaで作る全言語対応超高速全文検索システム
Kouhei Sutou
PGroonga 2 – Make PostgreSQL rich full text search system backend!
PGroonga 2 – Make PostgreSQL rich full text search system backend!
Kouhei Sutou
PGroonga 2 - PostgreSQLでの全文検索の決定版
PGroonga 2 - PostgreSQLでの全文検索の決定版
Kouhei Sutou
PostgreSQLとPGroongaで作るPHPマニュアル高速全文検索システム
PostgreSQLとPGroongaで作るPHPマニュアル高速全文検索システム
Kouhei Sutou
More from Kouhei Sutou
(20)
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache Arrow
RubyKaigi Takeout 2021 - Red Arrow - Ruby and Apache Arrow
Rubyと仕事と自由なソフトウェア
Rubyと仕事と自由なソフトウェア
Apache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのか
Apache Arrow 1.0 - A cross-language development platform for in-memory data
Apache Arrow 1.0 - A cross-language development platform for in-memory data
Apache Arrow 2019
Apache Arrow 2019
Redmine検索の未来像
Redmine検索の未来像
Apache Arrow - A cross-language development platform for in-memory data
Apache Arrow - A cross-language development platform for in-memory data
Better CSV processing with Ruby 2.6
Better CSV processing with Ruby 2.6
Apache Arrow
Apache Arrow
Apache Arrow - データ処理ツールの次世代プラットフォーム
Apache Arrow - データ処理ツールの次世代プラットフォーム
Apache Arrow
Apache Arrow
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL 8.0でMroonga
MySQL 8.0でMroonga
My way with Ruby
My way with Ruby
Red Data Tools
Red Data Tools
Mroongaの高速全文検索機能でWordPress内のコンテンツを有効活用!
Mroongaの高速全文検索機能でWordPress内のコンテンツを有効活用!
MariaDBとMroongaで作る全言語対応超高速全文検索システム
MariaDBとMroongaで作る全言語対応超高速全文検索システム
PGroonga 2 – Make PostgreSQL rich full text search system backend!
PGroonga 2 – Make PostgreSQL rich full text search system backend!
PGroonga 2 - PostgreSQLでの全文検索の決定版
PGroonga 2 - PostgreSQLでの全文検索の決定版
PostgreSQLとPGroongaで作るPHPマニュアル高速全文検索システム
PostgreSQLとPGroongaで作るPHPマニュアル高速全文検索システム
PostgreSQLで日本語全文検索 - LIKEとpg_bigmとPGroonga
1.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 PostgreSQLで 日本語全文検索 LIKEとpg_bigmとPGroonga 須藤功平 株式会社クリアコード PostgreSQLアンカンファレンス@東京 2015-05-30
2.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 内容 PostgreSQLで使える 日本語全文検索方法を 順に紹介
3.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 1: LIKE メリット 標準で使える インデックス作成不要 (データ更新が遅くならない) データが少なければ十分速い デメリット データ量に比例して遅くなる
4.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 「少ない」データ? どのくらいなら 少ないのか ↓ 計測結果と要件 で判断
5.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 計測 pg_bigmでいろんなデータを 日本語検索してみよう! http://qiita.com/fujii_masao/items/87f1d94ff4d350a718aa 青空文庫の書籍一覧データ 住所データ 日本版Wikipediaの タイトル一覧データ
6.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 青空文庫:作品名 データ: 11,818件 1レコード平均17バイト 速度: 6.673ms 十分速い
7.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 住所データ:市区町村 データ: 147,769件 1レコード平均14バイト 速度: 70.684ms 十分速い
8.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 Wikipedia:タイトル データ: 2,461,588件 1レコード平均20バイト 速度: 943.450ms 十分速い?
9.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 LIKEの計測結果 件数 平均サイズ 速度 11,818 17バイト 6.673ms 147,769 14バイト 70.684ms 2,461,588 20バイト 943.450ms 十分速いならLIKEでOK!
10.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 LIKE以外の選択肢 pg_bigm PGroonga
11.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 2: pg_bigm メリット データ量が多くても高速 ストリーミングレプリケーション可 デメリット 別途インストールしないといけない インデックス作成が遅い ヒット数に比例して遅くなる
12.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 遅い? 計測して確認 備考: LIKEでは計測していないがLIKEよりは確実に速い LIKEはヒット数に依らずすべて同程度の検索時間になる
13.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 計測 PGroongaとpg_bigmの ベンチマーク結果 https://github.com/groonga/wikipedia-search/issues/2 データ 日本語版Wikipediaの本文 1,846,514件 1レコード平均3777バイト
14.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 インデックス作成 元データの ロード時間 インデックス 作成時間 16分31秒 5時間56分15秒 遅い?そうでもない?
15.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 ヒット数と検索時間 ヒット数 検索時間 361 0.107s 17,168 1.224s 22,885 2.472s 625,792 0.556s(*) (*) 検索語が2文字以下ならヒット数が増えても遅くならない (*) work_memを10MBに増やしている 遅い?そうでもない?
16.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 pg_bigmの計測結果 インデックス作成時間: 約6時間 検索時間 ヒット数 検索時間 361 0.107s 17,168 1.224s 22,885 2.472s 625,792 0.556s 遅くないならpg_bigmでOK!
17.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 残りの選択肢 PGroonga
18.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 3: PGroonga メリット インデックス作成が速い データ量が多くても高速 ヒット数が多くても高速 デメリット 別途インストールしないといけない ストリーミングレプリケーション×
19.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 インデックス作成 元データの ロード時間 インデックス 作成時間 16分31秒 25分37秒
20.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 インデックス作成:比較 PGroonga pg_bigm 25分37秒 5時間56分15秒 非常に高速
21.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 ヒット数と検索時間 ヒット数 検索時間 368 0.030s 17,172 0.121s 22,885 0.179s 625,792 0.646s(*) (*) work_memを10MBに増やしている (*) 直接Groongaで検索すると0.085s
22.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 検索時間:比較 ヒット数 PGroonga pg_bigm 368 0.030s 0.107s 17,172 0.121s 1.224s 22,885 0.179s 2.472s 625,792 0.646s 0.556s 非常に高速
23.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 おねがい 同じベンチマークを実行して 結果を貼ってください! 同じ傾向があるか確認したい ベンチマークの実行方法↓ (ここでまとめたデータの生データも貼ってある) https://github.com/groonga/wikipedia-search/issues/2
24.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 まとめ1 データが少ないならLIKEで十分 1レコード数十バイトなら 百万件はいける データが多いならLIKEはツライ
25.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 まとめ2 データ多→pg_bigmかPGroonga 2文字以下での全文検索がほとんど →pg_bigm ストリーミングレプリケーション要 →pg_bigm ヒット件数が多い→PGroonga レコードサイズが大きい→PGroonga 更新が多い→PGroonga (インデックス作成が速いから)
26.
PostgreSQLで 日本語全文検索 -
LIKEとpg_bigmとPGroonga Powered by Rabbit 2.1.7 参考情報 PGroongaでも レプリケーションできる! pg_shardとPGroongaを使った レプリケーション対応の 高速日本語全文検索可能な PostgreSQLクラスターの作り方 http://www.clear-code.com/blog/2015/5/18.html
Download now