rabbit-slide-kou-postgresql-conference-2015 2015.11.27.0 → 2015.11.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rd +8 -0
- data/config.yaml +2 -1
- data/images/performance-charcteristic-for-constant-read-and-write.svg +251 -0
- data/images/search-gin.svg +1438 -0
- data/images/update-gin.svg +722 -0
- data/images/update-groonga.svg +635 -0
- data/pdf/postgresql-conference-2015-pgroonga-implementation.pdf +0 -0
- data/pgroonga-implementation.rab +78 -10
- data/private/images/groonga-meatup-2015-design.svg +2087 -0
- metadata +9 -3
data/pgroonga-implementation.rab
CHANGED
@@ -79,7 +79,7 @@ PostgreSQLに\n
|
|
79
79
|
CREATE INDEX name ON table
|
80
80
|
USING gin (column gin_trgm_ops);
|
81
81
|
SELECT * FROM table
|
82
|
-
WHERE column
|
82
|
+
WHERE column LIKE '%...%';
|
83
83
|
|
84
84
|
(('tag:center'))
|
85
85
|
contrib/pg_trgm\n
|
@@ -133,10 +133,10 @@ contrib/pg_trgm\n
|
|
133
133
|
|
134
134
|
ヒット数 | PGroonga | pg_bigm
|
135
135
|
|
136
|
-
368 | 0.030s
|
137
|
-
17,172 | 0.121s
|
138
|
-
22,885 | 0.179s
|
139
|
-
625,792(*) | 0.646s
|
136
|
+
368 | ((*0.030s*)) | (('0.107s'))
|
137
|
+
17,172 | ((*0.121s*)) | (('1.224s'))
|
138
|
+
22,885 | ((*0.179s*)) | (('2.472s'))
|
139
|
+
625,792\n(('note:(*)')) | (('0.646s')) | ((*0.556s*))
|
140
140
|
|
141
141
|
(('note:(*) 他は検索語が3文字以上でこれだけ2文字'))
|
142
142
|
|
@@ -159,7 +159,8 @@ PGroongaは安定して速い!
|
|
159
159
|
|
160
160
|
= 全文検索ライブラリー
|
161
161
|
|
162
|
-
Groonga
|
162
|
+
Groonga\n
|
163
|
+
(ぐるんが)
|
163
164
|
|
164
165
|
= Groonga
|
165
166
|
|
@@ -239,6 +240,12 @@ Groonga
|
|
239
240
|
参照性能が\n
|
240
241
|
落ちない
|
241
242
|
|
243
|
+
= 性能傾向
|
244
|
+
|
245
|
+
# image
|
246
|
+
# src = images/performance-charcteristic-for-constant-read-and-write.svg
|
247
|
+
# relative_height = 95
|
248
|
+
|
242
249
|
= 落ちない理由
|
243
250
|
|
244
251
|
更新時に\n
|
@@ -301,16 +308,44 @@ Groonga
|
|
301
308
|
* GINは両方ある
|
302
309
|
* (({FASTUPDATE}))を無効にしていない場合
|
303
310
|
|
304
|
-
=
|
311
|
+
= 間欠的性能劣化:Groonga
|
312
|
+
|
313
|
+
(('tag:center'))
|
314
|
+
Groongaは間欠的性能劣化なし
|
305
315
|
|
306
316
|
* 常に最新ポスティングリストを\n
|
307
317
|
維持しているから
|
308
318
|
* 更新負荷が高くならない対策入り\n
|
309
319
|
(('note:https://github.com/groonga/groonga/wiki/Memo'))
|
310
|
-
|
320
|
+
|
321
|
+
= Groongaの索引更新
|
322
|
+
|
323
|
+
# image
|
324
|
+
# src = images/update-groonga.svg
|
325
|
+
# relative_height = 100
|
326
|
+
|
327
|
+
= 間欠的性能劣化:GIN
|
328
|
+
|
329
|
+
(('tag:center'))
|
330
|
+
GINは間欠的性能劣化あり
|
331
|
+
|
332
|
+
* 最新ポスティングリスト維持を\n
|
333
|
+
サボって高速化しているから
|
311
334
|
* サボったつけを払うときに性能劣化
|
312
335
|
* 例:検索時・更新が溜まりすぎた時
|
313
336
|
|
337
|
+
= GINの索引更新
|
338
|
+
|
339
|
+
# image
|
340
|
+
# src = images/update-gin.svg
|
341
|
+
# relative_height = 100
|
342
|
+
|
343
|
+
= GINの索引検索
|
344
|
+
|
345
|
+
# image
|
346
|
+
# src = images/search-gin.svg
|
347
|
+
# relative_height = 100
|
348
|
+
|
314
349
|
= 本格的な例4
|
315
350
|
|
316
351
|
(('tag:center'))
|
@@ -526,7 +561,8 @@ JSON内の全テキストから全文検索
|
|
526
561
|
|
527
562
|
* 索引がデータも返す
|
528
563
|
* テーブルにアクセスしないので高速
|
529
|
-
* PGroonga・B-tree
|
564
|
+
* PGroonga・B-tree:サポート\n
|
565
|
+
(('note:PostgreSQL 9.5からはGiSTもサポート'))
|
530
566
|
* GIN:未サポート
|
531
567
|
|
532
568
|
= amindexでのポイント
|
@@ -599,7 +635,7 @@ JSON内の全テキストから全文検索
|
|
599
635
|
|
600
636
|
PGroonga | pg_bigm | Groonga
|
601
637
|
|
602
|
-
0.646s | 0.556s | 0.085s
|
638
|
+
(('0.646s')) | (('0.556s')) | ((*0.085s*))
|
603
639
|
|
604
640
|
(('note:ヒット数635,792、検索語は2文字'))
|
605
641
|
|
@@ -641,6 +677,22 @@ find\n
|
|
641
677
|
(('tag:center'))
|
642
678
|
(('note:Groongaでは使える'))
|
643
679
|
|
680
|
+
= 複合主キーサポート
|
681
|
+
|
682
|
+
# coderay sql
|
683
|
+
CREATE TABLE t (
|
684
|
+
c1 INT,
|
685
|
+
c2 INT,
|
686
|
+
PRIMARY KEY (c1, c2)
|
687
|
+
);
|
688
|
+
CREATE INDEX index ON t
|
689
|
+
USING pgroonga (c1, c2);
|
690
|
+
|
691
|
+
= ((' '))
|
692
|
+
|
693
|
+
まとめ\n
|
694
|
+
(('note:時間が余ったらチュートリアルを自慢する'))
|
695
|
+
|
644
696
|
= まとめ
|
645
697
|
|
646
698
|
* PGroongaは速い
|
@@ -659,3 +711,19 @@ PGroongaを使おう!
|
|
659
711
|
* PGroongaの話題もアリ
|
660
712
|
* 多少空きアリ(('note:(定員を多少増やせる)'))
|
661
713
|
* 11月29日(日)13:30開始
|
714
|
+
* (('note:来年2月9日は「MySQLとPostgreSQLと日本語全文検索」'))\n
|
715
|
+
(('note:https://groonga.doorkeeper.jp/events/35295'))
|
716
|
+
|
717
|
+
# == スライドプロパティ
|
718
|
+
|
719
|
+
# : background-image
|
720
|
+
# private/images/groonga-meatup-2015-design.svg
|
721
|
+
|
722
|
+
# : background-image-relative-width
|
723
|
+
# 22
|
724
|
+
|
725
|
+
# : background-image-align
|
726
|
+
# right
|
727
|
+
|
728
|
+
# : background-image-vertical-align
|
729
|
+
# bottom
|