rabbit-slide-kou-zpnight 2017.9.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rabbit +1 -0
- data/README.rd +44 -0
- data/Rakefile +17 -0
- data/config.yaml +24 -0
- data/images/performance-charcteristic-for-constant-read-and-write.svg +259 -0
- data/images/read-while-write-gin.svg +364 -0
- data/images/read-while-write-pgroonga.svg +325 -0
- data/images/search-pgroonga-groonga-textsearch.pdf +0 -0
- data/images/search-pgroonga-pg-bigm.pdf +0 -0
- data/images/search-pgroonga-textsearch.pdf +0 -0
- data/pdf/zpnight-pgroonga-and-zulip.pdf +0 -0
- data/pgroonga-and-zulip.rab +275 -0
- data/theme.rb +3 -0
- metadata +87 -0
@@ -0,0 +1,325 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
7
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
10
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
11
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
12
|
+
width="178.45932mm"
|
13
|
+
height="94.392349mm"
|
14
|
+
viewBox="0 0 632.33617 334.46105"
|
15
|
+
id="svg2"
|
16
|
+
version="1.1"
|
17
|
+
inkscape:version="0.91 r13725"
|
18
|
+
sodipodi:docname="read-while-write-pgroonga.svg">
|
19
|
+
<defs
|
20
|
+
id="defs4">
|
21
|
+
<marker
|
22
|
+
inkscape:stockid="Arrow2Mend"
|
23
|
+
orient="auto"
|
24
|
+
refY="0"
|
25
|
+
refX="0"
|
26
|
+
id="marker10008"
|
27
|
+
style="overflow:visible"
|
28
|
+
inkscape:isstock="true">
|
29
|
+
<path
|
30
|
+
id="path10010"
|
31
|
+
style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:#4e9a06;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
32
|
+
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
33
|
+
transform="scale(-0.6,-0.6)"
|
34
|
+
inkscape:connector-curvature="0" />
|
35
|
+
</marker>
|
36
|
+
<marker
|
37
|
+
inkscape:stockid="Arrow2Mend"
|
38
|
+
orient="auto"
|
39
|
+
refY="0"
|
40
|
+
refX="0"
|
41
|
+
id="marker9914"
|
42
|
+
style="overflow:visible"
|
43
|
+
inkscape:isstock="true">
|
44
|
+
<path
|
45
|
+
id="path9916"
|
46
|
+
style="fill:#204a87;fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
47
|
+
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
48
|
+
transform="scale(-0.6,-0.6)"
|
49
|
+
inkscape:connector-curvature="0" />
|
50
|
+
</marker>
|
51
|
+
<marker
|
52
|
+
inkscape:stockid="Arrow1Mstart"
|
53
|
+
orient="auto"
|
54
|
+
refY="0"
|
55
|
+
refX="0"
|
56
|
+
id="Arrow1Mstart"
|
57
|
+
style="overflow:visible"
|
58
|
+
inkscape:isstock="true">
|
59
|
+
<path
|
60
|
+
id="path4179"
|
61
|
+
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
|
62
|
+
style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:#4e9a06;stroke-width:1pt;stroke-opacity:1"
|
63
|
+
transform="matrix(0.4,0,0,0.4,4,0)"
|
64
|
+
inkscape:connector-curvature="0" />
|
65
|
+
</marker>
|
66
|
+
<marker
|
67
|
+
inkscape:stockid="Arrow2Lend"
|
68
|
+
orient="auto"
|
69
|
+
refY="0"
|
70
|
+
refX="0"
|
71
|
+
id="marker6722"
|
72
|
+
style="overflow:visible"
|
73
|
+
inkscape:isstock="true">
|
74
|
+
<path
|
75
|
+
id="path6724"
|
76
|
+
style="fill:#a40000;fill-opacity:1;fill-rule:evenodd;stroke:#a40000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
77
|
+
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
78
|
+
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
79
|
+
inkscape:connector-curvature="0" />
|
80
|
+
</marker>
|
81
|
+
<marker
|
82
|
+
inkscape:isstock="true"
|
83
|
+
style="overflow:visible"
|
84
|
+
id="marker4517"
|
85
|
+
refX="0"
|
86
|
+
refY="0"
|
87
|
+
orient="auto"
|
88
|
+
inkscape:stockid="Arrow2Lend">
|
89
|
+
<path
|
90
|
+
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
91
|
+
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
92
|
+
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
93
|
+
id="path4519"
|
94
|
+
inkscape:connector-curvature="0" />
|
95
|
+
</marker>
|
96
|
+
<marker
|
97
|
+
inkscape:stockid="Arrow2Lend"
|
98
|
+
orient="auto"
|
99
|
+
refY="0"
|
100
|
+
refX="0"
|
101
|
+
id="Arrow2Lend"
|
102
|
+
style="overflow:visible"
|
103
|
+
inkscape:isstock="true"
|
104
|
+
inkscape:collect="always">
|
105
|
+
<path
|
106
|
+
id="path4194"
|
107
|
+
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
108
|
+
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
109
|
+
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
110
|
+
inkscape:connector-curvature="0" />
|
111
|
+
</marker>
|
112
|
+
<marker
|
113
|
+
inkscape:stockid="Arrow2Mend"
|
114
|
+
orient="auto"
|
115
|
+
refY="0"
|
116
|
+
refX="0"
|
117
|
+
id="Arrow2Mend"
|
118
|
+
style="overflow:visible"
|
119
|
+
inkscape:isstock="true"
|
120
|
+
inkscape:collect="always">
|
121
|
+
<path
|
122
|
+
id="path4200"
|
123
|
+
style="fill:#a40000;fill-opacity:1;fill-rule:evenodd;stroke:#a40000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
124
|
+
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
125
|
+
transform="scale(-0.6,-0.6)"
|
126
|
+
inkscape:connector-curvature="0" />
|
127
|
+
</marker>
|
128
|
+
<marker
|
129
|
+
inkscape:stockid="Arrow1Mend"
|
130
|
+
orient="auto"
|
131
|
+
refY="0"
|
132
|
+
refX="0"
|
133
|
+
id="Arrow1Mend"
|
134
|
+
style="overflow:visible"
|
135
|
+
inkscape:isstock="true">
|
136
|
+
<path
|
137
|
+
id="path4182"
|
138
|
+
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
|
139
|
+
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
|
140
|
+
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
141
|
+
inkscape:connector-curvature="0" />
|
142
|
+
</marker>
|
143
|
+
</defs>
|
144
|
+
<sodipodi:namedview
|
145
|
+
id="base"
|
146
|
+
pagecolor="#ffffff"
|
147
|
+
bordercolor="#666666"
|
148
|
+
borderopacity="1.0"
|
149
|
+
inkscape:pageopacity="0.0"
|
150
|
+
inkscape:pageshadow="2"
|
151
|
+
inkscape:zoom="1.4"
|
152
|
+
inkscape:cx="299.08594"
|
153
|
+
inkscape:cy="182.42264"
|
154
|
+
inkscape:document-units="px"
|
155
|
+
inkscape:current-layer="layer1"
|
156
|
+
showgrid="false"
|
157
|
+
inkscape:window-width="1920"
|
158
|
+
inkscape:window-height="1016"
|
159
|
+
inkscape:window-x="1920"
|
160
|
+
inkscape:window-y="27"
|
161
|
+
inkscape:window-maximized="1"
|
162
|
+
fit-margin-top="5"
|
163
|
+
fit-margin-left="5"
|
164
|
+
fit-margin-right="5"
|
165
|
+
fit-margin-bottom="5" />
|
166
|
+
<metadata
|
167
|
+
id="metadata7">
|
168
|
+
<rdf:RDF>
|
169
|
+
<cc:Work
|
170
|
+
rdf:about="">
|
171
|
+
<dc:format>image/svg+xml</dc:format>
|
172
|
+
<dc:type
|
173
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
174
|
+
<dc:title></dc:title>
|
175
|
+
</cc:Work>
|
176
|
+
</rdf:RDF>
|
177
|
+
</metadata>
|
178
|
+
<g
|
179
|
+
inkscape:label="レイヤー 1"
|
180
|
+
inkscape:groupmode="layer"
|
181
|
+
id="layer1"
|
182
|
+
transform="translate(-32.052038,-1.9546186)">
|
183
|
+
<text
|
184
|
+
xml:space="preserve"
|
185
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
186
|
+
x="48.487324"
|
187
|
+
y="179.59039"
|
188
|
+
id="text4136"
|
189
|
+
sodipodi:linespacing="125%"><tspan
|
190
|
+
sodipodi:role="line"
|
191
|
+
id="tspan4140"
|
192
|
+
x="48.487324"
|
193
|
+
y="179.59039">Conn1</tspan></text>
|
194
|
+
<text
|
195
|
+
sodipodi:linespacing="125%"
|
196
|
+
id="text4142"
|
197
|
+
y="220.33009"
|
198
|
+
x="48.487324"
|
199
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
200
|
+
xml:space="preserve"><tspan
|
201
|
+
sodipodi:role="line"
|
202
|
+
id="tspan4146"
|
203
|
+
x="48.487324"
|
204
|
+
y="220.33009">Conn2</tspan></text>
|
205
|
+
<path
|
206
|
+
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
|
207
|
+
d="m 137.38075,169.48888 507.61925,0"
|
208
|
+
id="path4167"
|
209
|
+
inkscape:connector-curvature="0" />
|
210
|
+
<path
|
211
|
+
inkscape:connector-curvature="0"
|
212
|
+
id="path4515"
|
213
|
+
d="m 137.38075,208.20317 507.61925,0"
|
214
|
+
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker4517)" />
|
215
|
+
<text
|
216
|
+
xml:space="preserve"
|
217
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:100%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
218
|
+
x="193.59502"
|
219
|
+
y="90.465172"
|
220
|
+
id="text4851"
|
221
|
+
sodipodi:linespacing="100%"><tspan
|
222
|
+
sodipodi:role="line"
|
223
|
+
id="tspan4867"
|
224
|
+
x="193.59502"
|
225
|
+
y="90.465172">INSERT</tspan><tspan
|
226
|
+
sodipodi:role="line"
|
227
|
+
id="tspan4869"
|
228
|
+
x="193.59502"
|
229
|
+
y="125.42457">start</tspan></text>
|
230
|
+
<text
|
231
|
+
xml:space="preserve"
|
232
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:100%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
233
|
+
x="234.51595"
|
234
|
+
y="281.2085"
|
235
|
+
id="text4855"
|
236
|
+
sodipodi:linespacing="100%"><tspan
|
237
|
+
sodipodi:role="line"
|
238
|
+
id="tspan6218"
|
239
|
+
x="234.51595"
|
240
|
+
y="281.2085">SELECT</tspan><tspan
|
241
|
+
sodipodi:role="line"
|
242
|
+
id="tspan6220"
|
243
|
+
x="234.51595"
|
244
|
+
y="316.16791">start</tspan></text>
|
245
|
+
<path
|
246
|
+
inkscape:connector-curvature="0"
|
247
|
+
id="path4886"
|
248
|
+
d="m 191.92899,149.28583 257.60649,0"
|
249
|
+
style="fill:none;fill-rule:evenodd;stroke:#a40000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
|
250
|
+
sodipodi:nodetypes="cc" />
|
251
|
+
<path
|
252
|
+
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
253
|
+
d="m 453.55849,135.64877 0,109.98137"
|
254
|
+
id="path8642"
|
255
|
+
inkscape:connector-curvature="0"
|
256
|
+
sodipodi:nodetypes="cc" />
|
257
|
+
<text
|
258
|
+
sodipodi:linespacing="100%"
|
259
|
+
id="text8644"
|
260
|
+
y="90.465172"
|
261
|
+
x="452.19406"
|
262
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:100%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
263
|
+
xml:space="preserve"><tspan
|
264
|
+
y="90.465172"
|
265
|
+
x="452.19406"
|
266
|
+
id="tspan8648"
|
267
|
+
sodipodi:role="line">INSERT</tspan><tspan
|
268
|
+
y="125.42457"
|
269
|
+
x="452.19406"
|
270
|
+
sodipodi:role="line"
|
271
|
+
id="tspan8652">finish</tspan></text>
|
272
|
+
<text
|
273
|
+
sodipodi:linespacing="100%"
|
274
|
+
id="text9832"
|
275
|
+
y="281.2085"
|
276
|
+
x="346.57138"
|
277
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:100%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
278
|
+
xml:space="preserve"><tspan
|
279
|
+
y="281.2085"
|
280
|
+
x="346.57138"
|
281
|
+
id="tspan9834"
|
282
|
+
sodipodi:role="line">SELECT</tspan><tspan
|
283
|
+
y="316.16791"
|
284
|
+
x="346.57138"
|
285
|
+
id="tspan9836"
|
286
|
+
sodipodi:role="line">finish</tspan></text>
|
287
|
+
<path
|
288
|
+
inkscape:connector-curvature="0"
|
289
|
+
id="path9838"
|
290
|
+
d="m 233.34524,233.84533 110.03682,0"
|
291
|
+
style="fill:none;fill-rule:evenodd;stroke:#204a87;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker9914)"
|
292
|
+
sodipodi:nodetypes="cc" />
|
293
|
+
<text
|
294
|
+
xml:space="preserve"
|
295
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:125%;font-family:Sans;-inkscape-font-specification:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
296
|
+
x="281.94351"
|
297
|
+
y="46.546139"
|
298
|
+
id="text10678"
|
299
|
+
sodipodi:linespacing="125%"><tspan
|
300
|
+
sodipodi:role="line"
|
301
|
+
id="tspan10680"
|
302
|
+
x="281.94351"
|
303
|
+
y="46.546139">PGroonga</tspan></text>
|
304
|
+
<rect
|
305
|
+
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#4e9a06;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
306
|
+
id="rect4301"
|
307
|
+
width="230.52757"
|
308
|
+
height="47.240784"
|
309
|
+
x="410.35919"
|
310
|
+
y="262.4379"
|
311
|
+
rx="5"
|
312
|
+
ry="5" />
|
313
|
+
<text
|
314
|
+
xml:space="preserve"
|
315
|
+
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
316
|
+
x="529.84473"
|
317
|
+
y="298.83905"
|
318
|
+
id="text4232"
|
319
|
+
sodipodi:linespacing="125%"><tspan
|
320
|
+
sodipodi:role="line"
|
321
|
+
id="tspan5604"
|
322
|
+
x="529.84473"
|
323
|
+
y="298.83905">No slow down!</tspan></text>
|
324
|
+
</g>
|
325
|
+
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,275 @@
|
|
1
|
+
= PGroonga\n&\nZulip
|
2
|
+
|
3
|
+
: author
|
4
|
+
Kouhei Sutou
|
5
|
+
: institution
|
6
|
+
ClearCode Inc.
|
7
|
+
: content-source
|
8
|
+
Zulip & PGroonga Night
|
9
|
+
: date
|
10
|
+
2017-09-06
|
11
|
+
: allotted-time
|
12
|
+
30m
|
13
|
+
: theme
|
14
|
+
.
|
15
|
+
|
16
|
+
= PGroonga
|
17
|
+
|
18
|
+
* Pronunciation: píːzí:lúnɡά\n
|
19
|
+
(('note:読み方:ぴーじーるんが'))
|
20
|
+
|
21
|
+
* PostgreSQL extension\n
|
22
|
+
(('note:PostgreSQLの拡張機能'))
|
23
|
+
* Fast full text search\n
|
24
|
+
(('note:高速全文検索機能'))
|
25
|
+
* All languages are supported!\n
|
26
|
+
(('note:全言語対応!'))
|
27
|
+
|
28
|
+
= Fast?(('note:(高速?)'))
|
29
|
+
|
30
|
+
* Need to measure to confirm\n
|
31
|
+
(('note:確認するには測定しないと'))
|
32
|
+
* Targets(('note:(測定対象)'))
|
33
|
+
* textsearch (built-in)(('note:(組み込み)'))
|
34
|
+
* pg_bigm (third party)(('note:(外部プロダクト)'))
|
35
|
+
|
36
|
+
= PGroona and textsearch
|
37
|
+
|
38
|
+
# image
|
39
|
+
# src = images/search-pgroonga-textsearch.pdf
|
40
|
+
# relative_height = 100
|
41
|
+
|
42
|
+
= As fast as textsearch\n(('note:textsearchと同じくらいの速さ'))
|
43
|
+
|
44
|
+
* textsearch uses word based full text search\n
|
45
|
+
(('note:textsearchは単語ベースの全文検索実装'))
|
46
|
+
* PostgreSQL has enough performance for the approach\n
|
47
|
+
(('note:PostgreSQLはこの方法では十分な性能を出せる'))
|
48
|
+
|
49
|
+
= textsearch and Japanese\n(('note:textsearchと日本語'))
|
50
|
+
|
51
|
+
* Asian languages including Japanese aren't supported\n
|
52
|
+
(('note:日本語を含むアジア圏の言語は非サポート'))
|
53
|
+
* Need plugin(('note:(プラグインが必要)'))
|
54
|
+
* Plugin exists but isn't maintained\n
|
55
|
+
(('note:プラグインはあるがメンテナンスされていない'))
|
56
|
+
|
57
|
+
= Japanese support\n(('note:日本語対応'))
|
58
|
+
|
59
|
+
* Need one of them(('note:(どちらかが必要)'))
|
60
|
+
* N-gram approach support\n
|
61
|
+
(('note:N-gramというやり方のサポート'))
|
62
|
+
* Japanese specific word based approach support\n
|
63
|
+
(('note:日本語を考慮した単語ベースのやり方のサポート'))
|
64
|
+
|
65
|
+
(('tag:center'))
|
66
|
+
PGroonga supports both of them\n
|
67
|
+
🕺
|
68
|
+
|
69
|
+
= PostgreSQL and N-gram\n(('note:PostgreSQLとN-gram'))
|
70
|
+
|
71
|
+
* PostgreSQL is slow with N-gram approach\n
|
72
|
+
(('note:PostgreSQLでN-gramというやり方を使うと遅い'))
|
73
|
+
* N-gram approach:
|
74
|
+
* pg_trgm (contrib)
|
75
|
+
* Japanese isn't supported by default\n
|
76
|
+
(('note:デフォルトでは日本語に対応していない'))
|
77
|
+
* pg_bigm (third-party)
|
78
|
+
|
79
|
+
= PGroona and pg_bigm
|
80
|
+
|
81
|
+
# image
|
82
|
+
# src = images/search-pgroonga-pg-bigm.pdf
|
83
|
+
# relative_height = 100
|
84
|
+
|
85
|
+
= PGroonga is fast stably\n(('note:PGroongaは安定して速い'))
|
86
|
+
|
87
|
+
* PostgreSQL needs "recheck" for N-gram approach\n
|
88
|
+
(('note:PostgreSQLはN-gramのときは「recheck」が必要'))
|
89
|
+
* Seq search after index search\n
|
90
|
+
(('note:インデックスサーチのあとにシーケンシャルサーチ'))
|
91
|
+
* PGroonga doesn't need\n(('note:PGroongaでは必要ない'))
|
92
|
+
* Only index search\n
|
93
|
+
(('note:インデックスサーチだけでOK'))
|
94
|
+
|
95
|
+
= Wrap up\n(('note:まとめ'))
|
96
|
+
|
97
|
+
* textsearch is fast but Asian langs aren't supported\n
|
98
|
+
(('note:textsearchは速いけどアジア圏の言語を未サポート'))
|
99
|
+
* pg_bigm supports Japanese but is slow for large hits\n
|
100
|
+
(('note:pg_bigmは日本語対応だがヒット数が多くなると遅い'))
|
101
|
+
* PGroonga is fast and supports all languages\n
|
102
|
+
(('note:PGroongaは速くて全言語対応'))
|
103
|
+
|
104
|
+
= FYI: textsearch, PGroonga and Groonga
|
105
|
+
|
106
|
+
# image
|
107
|
+
# src = images/search-pgroonga-groonga-textsearch.pdf
|
108
|
+
# relative_height = 100
|
109
|
+
|
110
|
+
= Zulip and PGroonga
|
111
|
+
|
112
|
+
* Zulip uses textsearch by default\n
|
113
|
+
(('note:Zulipはデフォルトでtextsearchを使用'))
|
114
|
+
* Japanese isn't supported\n
|
115
|
+
(('note:日本語非対応'))
|
116
|
+
* Zulip supports PGroonga as option\n
|
117
|
+
(('note:ZulipでPGroongaも使うこともできる'))
|
118
|
+
* Implemented by me\n
|
119
|
+
(('note:私が実装'))
|
120
|
+
|
121
|
+
= Zulip: full text search\n(('note:Zulipと全文検索'))
|
122
|
+
|
123
|
+
* Zulip is chat tool\n
|
124
|
+
(('note:Zulipはチャットツール'))
|
125
|
+
* Latency is important for UX\n
|
126
|
+
(('note:UX的にレイテンシーは大事'))
|
127
|
+
* Index update is heavy\n
|
128
|
+
(('note:インデックスの更新は重い'))
|
129
|
+
* Delay index update\n
|
130
|
+
(('note:インデックスの更新を後回しにしている'))
|
131
|
+
|
132
|
+
= Delay index update\n(('note:インデックス更新を後回し'))
|
133
|
+
|
134
|
+
# coderay sql
|
135
|
+
CREATE TABLE zerver_message (
|
136
|
+
rendered_content text,
|
137
|
+
-- ... ↓Column for full text search
|
138
|
+
search_tsvector tsvector
|
139
|
+
); -- ↓Index for full text search
|
140
|
+
CREATE INDEX zerver_message_search_tsvector
|
141
|
+
ON zerver_message
|
142
|
+
USING gin (search_tsvector);
|
143
|
+
|
144
|
+
= Delay index update\n(('note:インデックス更新を後回し'))
|
145
|
+
|
146
|
+
# coderay sql
|
147
|
+
|
148
|
+
-- Execute append_to_fts_update_log() on change
|
149
|
+
CREATE TRIGGER
|
150
|
+
zerver_message_update_search_tsvector_async
|
151
|
+
BEFORE INSERT OR UPDATE OF rendered_content
|
152
|
+
ON zerver_message
|
153
|
+
FOR EACH ROW
|
154
|
+
EXECUTE PROCEDURE append_to_fts_update_log();
|
155
|
+
|
156
|
+
= Delay index update\n(('note:インデックス更新を後回し'))
|
157
|
+
|
158
|
+
# coderay sql
|
159
|
+
|
160
|
+
-- Insert ID to fts_update_log table
|
161
|
+
CREATE FUNCTION append_to_fts_update_log()
|
162
|
+
RETURNS trigger
|
163
|
+
LANGUAGE plpgsql AS $$
|
164
|
+
BEGIN
|
165
|
+
INSERT INTO fts_update_log (message_id)
|
166
|
+
VALUES (NEW.id);
|
167
|
+
RETURN NEW;
|
168
|
+
END
|
169
|
+
$$;
|
170
|
+
|
171
|
+
= Delay index update\n(('note:インデックス更新を後回し'))
|
172
|
+
|
173
|
+
# coderay sql
|
174
|
+
|
175
|
+
-- Keep ID to be updated
|
176
|
+
CREATE TABLE fts_update_log (
|
177
|
+
id SERIAL PRIMARY KEY,
|
178
|
+
message_id INTEGER NOT NULL
|
179
|
+
);
|
180
|
+
|
181
|
+
= Delay index update\n(('note:インデックス更新を後回し'))
|
182
|
+
|
183
|
+
# coderay sql
|
184
|
+
|
185
|
+
-- Execute do_notify_fts_update_log()
|
186
|
+
-- on INSERT
|
187
|
+
CREATE TRIGGER fts_update_log_notify
|
188
|
+
AFTER INSERT ON fts_update_log
|
189
|
+
FOR EACH STATEMENT
|
190
|
+
EXECUTE PROCEDURE
|
191
|
+
do_notify_fts_update_log();
|
192
|
+
|
193
|
+
= Delay index update\n(('note:インデックス更新を後回し'))
|
194
|
+
|
195
|
+
# coderay sql
|
196
|
+
|
197
|
+
-- NOTIFY to fts_update_log channel!
|
198
|
+
CREATE FUNCTION do_notify_fts_update_log()
|
199
|
+
RETURNS trigger
|
200
|
+
LANGUAGE plpgsql AS $$
|
201
|
+
BEGIN
|
202
|
+
NOTIFY fts_update_log;
|
203
|
+
RETURN NEW;
|
204
|
+
END
|
205
|
+
$$;
|
206
|
+
|
207
|
+
= Delay index update\n(('note:インデックス更新を後回し'))
|
208
|
+
|
209
|
+
# coderay python
|
210
|
+
|
211
|
+
cursor.execute("LISTEN ftp_update_log") # Wait
|
212
|
+
cursor.execute("SELECT id, message_id FROM fts_update_log")
|
213
|
+
ids = []
|
214
|
+
for (id, message_id) in cursor.fetchall():
|
215
|
+
cursor.execute("UPDATE zerver_message SET search_tsvector = "
|
216
|
+
"to_tsvector('zulip.english_us_search', "
|
217
|
+
"rendered_content) "
|
218
|
+
"WHERE id = %s", (message_id,))
|
219
|
+
ids.append(id)
|
220
|
+
cursor.execute("DELETE FROM fts_update_log WHERE id = ANY(%s)",
|
221
|
+
(ids,))
|
222
|
+
|
223
|
+
= PGroonga: index update\n(('note:PGroongaとインデックス更新'))
|
224
|
+
|
225
|
+
* PGroonga's index update is fast too\n
|
226
|
+
(('note:PGroongaはインデックス更新も速い'))
|
227
|
+
* PGroonga's search while index update is still fast\n
|
228
|
+
(('note:PGroongaはインデックス更新中の検索も速い'))
|
229
|
+
|
230
|
+
= Perf characteristics\n(('note:性能の傾向'))
|
231
|
+
|
232
|
+
# image
|
233
|
+
# src = images/performance-charcteristic-for-constant-read-and-write.svg
|
234
|
+
# relative_height = 100
|
235
|
+
|
236
|
+
= Update and lock\n(('note:更新とロック'))
|
237
|
+
|
238
|
+
* Update without ((*read*)) locks\n
|
239
|
+
(('note:((*参照*))ロックなしで更新'))
|
240
|
+
* ((*Write*)) locks are required\n
|
241
|
+
(('note:((*書き込み*))ロックは必要'))
|
242
|
+
|
243
|
+
= GIN: Read/Write\n(('note:GIN:読み書き'))
|
244
|
+
|
245
|
+
# image
|
246
|
+
# src = images/read-while-write-gin.svg
|
247
|
+
# relative_height = 100
|
248
|
+
|
249
|
+
= PGroonga: Read/Write\n(('note:PGroonga:読み書き'))
|
250
|
+
|
251
|
+
# image
|
252
|
+
# src = images/read-while-write-pgroonga.svg
|
253
|
+
# relative_height = 100
|
254
|
+
|
255
|
+
= Wrap up\n(('note:まとめ'))
|
256
|
+
|
257
|
+
* Zulip: Low latency for UX\n
|
258
|
+
(('note:ZulipはUXのために低レイテンシーをがんばっている'))
|
259
|
+
* Delay index update\n
|
260
|
+
(('note:インデックスの更新は後回し'))
|
261
|
+
* PGroonga: Keeps fast search with update\n
|
262
|
+
(('note:PGroongaは更新しながらでも高速検索を維持'))
|
263
|
+
* Chat friendly characteristics\n
|
264
|
+
(('note:チャット向きの特性'))
|
265
|
+
|
266
|
+
= More PGroonga features\n(('note:PGroongaの機能いろいろ'))
|
267
|
+
|
268
|
+
* Query expansion(('note:(クエリー展開)'))
|
269
|
+
* Support synonyms(('note:(同義語検索をサポート)'))
|
270
|
+
* Similar search(('note:(類似文書検索)'))
|
271
|
+
* Find similar messages\n
|
272
|
+
(('note:類似メッセージ検索'))
|
273
|
+
* Fuzzy search(('note:(あいまい検索)'))
|
274
|
+
* Stemming(('note:(ステミング)'))
|
275
|
+
|